summaryrefslogtreecommitdiffstats
path: root/generic/tclGet.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-04-22 15:46:39 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-04-22 15:46:39 (GMT)
commiteea5a1d7018e33f7fa50a613d6a5b912e7bb6707 (patch)
tree07c4be3b6538e21a3c5f5538a7ef1831f6d9ed9c /generic/tclGet.c
parent918dbfe6102b60da44efe1c8344461ad3bddb4b0 (diff)
downloadtcl-eea5a1d7018e33f7fa50a613d6a5b912e7bb6707.zip
tcl-eea5a1d7018e33f7fa50a613d6a5b912e7bb6707.tar.gz
tcl-eea5a1d7018e33f7fa50a613d6a5b912e7bb6707.tar.bz2
The 2005-04-21 changes to Tcl_GetBooleanFromObj were done to bring
it into agreement with its docs. Further investigation reveals it was the docs that were incorrect. * doc/BoolObj.3: Corrections to the documentation of Tcl_GetBooleanFromObj to bring it into agreement with what this public interface has always done, including noting the difference in function between Tcl_GetBooleanFromObj and Tcl_GetBoolean. * generic/tclGet.c: Revised Tcl_GetBoolean to no longer be a wrapper around Tcl_GetBooleanFromObj (different function!). * generic/tclObj.c: Removed TclGetTruthValueFromObj routine that was added yesterday. Revisions so that only Tcl_GetBoolean-approved values get the "boolean" Tcl_ObjType. This retains the fix for [Bug 1187123]. * generic/tclInt.h: Revert most recent change. * generic/tclBasic.c: * generic/tclCompCmds.c: * generic/tclDictObj.c: * generic/tclExecute.c: * tests/obj.test:
Diffstat (limited to 'generic/tclGet.c')
-rw-r--r--generic/tclGet.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tclGet.c b/generic/tclGet.c
index bad8289..bfc3501 100644
--- a/generic/tclGet.c
+++ b/generic/tclGet.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclGet.c,v 1.12 2005/04/21 20:24:13 dgp Exp $
+ * RCS: @(#) $Id: tclGet.c,v 1.13 2005/04/22 15:46:57 dgp Exp $
*/
#include "tclInt.h"
@@ -183,9 +183,12 @@ Tcl_GetBoolean(interp, str, boolPtr)
obj.length = strlen(str);
obj.typePtr = NULL;
- code = Tcl_GetBooleanFromObj(interp, &obj, boolPtr);
+ code = Tcl_ConvertToType(interp, &obj, &tclBooleanType);
if (obj.refCount > 1) {
Tcl_Panic("invalid sharing of Tcl_Obj on C stack");
}
+ if (code == TCL_OK) {
+ *boolPtr = obj.internalRep.longValue;
+ }
return code;
}