summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-04-21 20:24:02 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-04-21 20:24:02 (GMT)
commit713419b2244c57466ead6674b4c9d30c54dc60d8 (patch)
treed1b5923569a757d01be4827253f687dbd07a8163 /generic/tclInt.h
parent28deb99f386df3eb58792a8f7785860868d24d3d (diff)
downloadtcl-713419b2244c57466ead6674b4c9d30c54dc60d8.zip
tcl-713419b2244c57466ead6674b4c9d30c54dc60d8.tar.gz
tcl-713419b2244c57466ead6674b4c9d30c54dc60d8.tar.bz2
* generic/tclGet.c: Radical code simplification. Converted
Tcl_GetFoo() routines into wrappers around Tcl_GetFooFromObj(). Reduces code duplication, and the resulting potential for inconsistency. * generic/tclObj.c: Several changes: - Fixed Tcl_GetBooleanFromObj to agree with its documentation and with Tcl_GetBoolean, accepting only "0" and "1" and not other numeric strings. [Bug 1187123] - Added new private routine TclGetTruthValueFromObj to perform the more permissive conversion of numeric values to boolean that is needed by the [expr] machinery. * generic/tclInt.h (TclGetTruthValueFromObj): New routine. * generic/tclExecute.c: Updated callers to call new routine. * tests/obj.test: Corrected bad tests that actually expected values like "47" and "0xac" to be accepted as booleans.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 7777cfd..68c2827 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.223 2005/04/19 16:32:55 dgp Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.224 2005/04/21 20:24:13 dgp Exp $
*/
#ifndef _TCLINT
@@ -1892,6 +1892,8 @@ MODULE_SCOPE int TclGetNamespaceFromObj _ANSI_ARGS_((
MODULE_SCOPE Tcl_Obj * TclGetProcessGlobalValue _ANSI_ARGS_ ((
ProcessGlobalValue *pgvPtr));
+MODULE_SCOPE int TclGetTruthValueFromObj _ANSI_ARGS_ ((
+ Tcl_Interp *interp, Tcl_Obj *objPtr, int *boolPtr));
MODULE_SCOPE int TclGlob _ANSI_ARGS_((Tcl_Interp *interp,
char *pattern, Tcl_Obj *unquotedPrefix,
int globFlags, Tcl_GlobTypeData* types));