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)
commitf19dc488c7222a8e782fd227736f0d440c806bc4 (patch)
treebd2d423da13901270dfb339abfcd6c5ed9c91f86 /generic/tclLoad.c
parentf9c97ea67073aa3e2fa22b80e826b3d491e3440c (diff)
downloadtcl-f19dc488c7222a8e782fd227736f0d440c806bc4.zip
tcl-f19dc488c7222a8e782fd227736f0d440c806bc4.tar.gz
tcl-f19dc488c7222a8e782fd227736f0d440c806bc4.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;
}