diff options
author | dgp <dgp@noemail.net> | 2008-07-08 17:52:13 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2008-07-08 17:52:13 (GMT) |
commit | 28e01a2dcb0acbb8a85c0e241be9eeddf46b5084 (patch) | |
tree | 8b4a2e63bbb5d3e65f86afd3d02085a333a3ac07 /generic/tclGet.c | |
parent | d627f370c59d85db42a5c9f33c1fca531751457a (diff) | |
download | tcl-28e01a2dcb0acbb8a85c0e241be9eeddf46b5084.zip tcl-28e01a2dcb0acbb8a85c0e241be9eeddf46b5084.tar.gz tcl-28e01a2dcb0acbb8a85c0e241be9eeddf46b5084.tar.bz2 |
* generic/tclGet.c: Corrected out of date comments and removed
* generic/tclInt.decls: internal routine TclGetLong() that's no longer
used. If an extension is using this from the internal stubs table,
it can shift to the public routine Tcl_GetLongFromObj() or can
request addition of a public Tcl_GetLong().
***POTENTIAL INCOMPATIBILITY***
* generic/tclIntDecls.h: make genstubs
* generic/tclStubInit.c:
FossilOrigin-Name: 006f71d8fb9cbcab88a2c05cbace6bb4cc6f075b
Diffstat (limited to 'generic/tclGet.c')
-rw-r--r-- | generic/tclGet.c | 57 |
1 files changed, 7 insertions, 50 deletions
diff --git a/generic/tclGet.c b/generic/tclGet.c index 3dfe905..2ff203b 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.21 2008/04/27 22:21:30 dkf Exp $ + * RCS: @(#) $Id: tclGet.c,v 1.22 2008/07/08 17:52:15 dgp Exp $ */ #include "tclInt.h" @@ -39,7 +39,8 @@ int Tcl_GetInt( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ const char *src, /* String containing a (possibly signed) - * integer in a form acceptable to strtoul. */ + * integer in a form acceptable to + * Tcl_GetIntFromObj(). */ int *intPtr) /* Place to store converted result. */ { Tcl_Obj obj; @@ -60,50 +61,6 @@ Tcl_GetInt( /* *---------------------------------------------------------------------- * - * TclGetLong -- - * - * Given a string, produce the corresponding long integer value. This - * routine is a version of Tcl_GetInt but returns a "long" instead of an - * "int" (a difference that matters on 64-bit architectures). - * - * Results: - * The return value is normally TCL_OK; in this case *longPtr will be set - * to the long integer value equivalent to src. If src is improperly - * formed then TCL_ERROR is returned and an error message will be left in - * the interp's result if interp is non-NULL. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -int -TclGetLong( - Tcl_Interp *interp, /* Interpreter used for error reporting if not - * NULL. */ - const char *src, /* String containing a (possibly signed) long - * integer in a form acceptable to strtoul. */ - long *longPtr) /* Place to store converted long result. */ -{ - Tcl_Obj obj; - int code; - - obj.refCount = 1; - obj.bytes = (char *) src; - obj.length = strlen(src); - obj.typePtr = NULL; - - code = Tcl_GetLongFromObj(interp, &obj, longPtr); - if (obj.refCount > 1) { - Tcl_Panic("invalid sharing of Tcl_Obj on C stack"); - } - return code; -} - -/* - *---------------------------------------------------------------------- - * * Tcl_GetDouble -- * * Given a string, produce the corresponding double-precision @@ -125,7 +82,8 @@ int Tcl_GetDouble( Tcl_Interp *interp, /* Interpreter used for error reporting. */ const char *src, /* String containing a floating-point number - * in a form acceptable to strtod. */ + * in a form acceptable to + * Tcl_GetDoubleFromObj(). */ double *doublePtr) /* Place to store converted result. */ { Tcl_Obj obj; @@ -166,9 +124,8 @@ Tcl_GetDouble( int Tcl_GetBoolean( Tcl_Interp *interp, /* Interpreter used for error reporting. */ - const char *src, /* String containing a boolean number - * specified either as 1/0 or true/false or - * yes/no. */ + const char *src, /* String containing one of the boolean values + * 1, 0, true, false, yes, no, on, off. */ int *boolPtr) /* Place to store converted result, which will * be 0 or 1. */ { |