diff options
author | dkf <dkf@noemail.net> | 2012-04-05 09:34:56 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2012-04-05 09:34:56 (GMT) |
commit | 32e55d594e854d2e663e9c4b13c5bd2e5f2cecf7 (patch) | |
tree | bd2d423da13901270dfb339abfcd6c5ed9c91f86 /generic/tclLoad.c | |
parent | f9c0ef37bc63a2f25160b05092b444c64677aed6 (diff) | |
download | tcl-32e55d594e854d2e663e9c4b13c5bd2e5f2cecf7.zip tcl-32e55d594e854d2e663e9c4b13c5bd2e5f2cecf7.tar.gz tcl-32e55d594e854d2e663e9c4b13c5bd2e5f2cecf7.tar.bz2 |
Reduce amount of unreachable code. Refactor Win socket and load code to be less
baroque in its internals.
FossilOrigin-Name: 92cfbef04802afe414b04f8fff6a36b61d5ae27d
Diffstat (limited to 'generic/tclLoad.c')
-rw-r--r-- | generic/tclLoad.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 202e66a..008a99d 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -873,40 +873,10 @@ Tcl_UnloadObjCmd( done: Tcl_DStringFree(&pkgName); Tcl_DStringFree(&tmp); - if (!complain && code!=TCL_OK) { + if (!complain && (code != TCL_OK)) { code = TCL_OK; Tcl_ResetResult(interp); } - if (code == TCL_OK) { -#if 0 - /* - * Result of [unload] was not documented in TIP#100, so force to be - * the empty string by commenting this out. DKF. - */ - - Tcl_Obj *resultObjPtr, *objPtr[2]; - - /* - * Our result is the two reference counts. - */ - - TclNewIntObj(objPtr[0], trustedRefCount); - TclNewIntObj(objPtr[1], safeRefCount); - if (objPtr[0] == NULL || objPtr[1] == NULL) { - if (objPtr[0]) { - Tcl_DecrRefCount(objPtr[0]); - } - if (objPtr[1]) { - Tcl_DecrRefCount(objPtr[1]); - } - } else { - TclNewListObj(resultObjPtr, 2, objPtr); - if (resultObjPtr != NULL) { - Tcl_SetObjResult(interp, resultObjPtr); - } - } -#endif - } return code; } |