summaryrefslogtreecommitdiffstats
path: root/generic/tclLoad.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-04-05 09:34:56 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-04-05 09:34:56 (GMT)
commit045a39faf34fb7fe84c70f7862dcb04e8bd87e5f (patch)
treebd2d423da13901270dfb339abfcd6c5ed9c91f86 /generic/tclLoad.c
parent9cd3b6b2e13d2636c1b0455bd237e1231e1b9fc5 (diff)
downloadtcl-045a39faf34fb7fe84c70f7862dcb04e8bd87e5f.zip
tcl-045a39faf34fb7fe84c70f7862dcb04e8bd87e5f.tar.gz
tcl-045a39faf34fb7fe84c70f7862dcb04e8bd87e5f.tar.bz2
Reduce amount of unreachable code. Refactor Win socket and load code to be less
baroque in its internals.
Diffstat (limited to 'generic/tclLoad.c')
-rw-r--r--generic/tclLoad.c32
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;
}