summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-07-08 17:52:14 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-07-08 17:52:14 (GMT)
commit202c0ad200e4c9baabff9d3861777c1a47606158 (patch)
tree8b4a2e63bbb5d3e65f86afd3d02085a333a3ac07
parentfb746d8a585695e0450cea45765c7d1626d0ae79 (diff)
downloadtcl-202c0ad200e4c9baabff9d3861777c1a47606158.zip
tcl-202c0ad200e4c9baabff9d3861777c1a47606158.tar.gz
tcl-202c0ad200e4c9baabff9d3861777c1a47606158.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:
-rw-r--r--ChangeLog12
-rw-r--r--generic/tclGet.c57
-rw-r--r--generic/tclInt.decls9
-rw-r--r--generic/tclIntDecls.h16
-rw-r--r--generic/tclStubInit.c4
5 files changed, 30 insertions, 68 deletions
diff --git a/ChangeLog b/ChangeLog
index a8d50aa..d4a36e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2008-07-08 Don Porter <dgp@users.sourceforge.net>
+
+ * 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:
+
2008-07-08 Donal K. Fellows <dkf@users.sf.net>
* doc/CrtInterp.3: Tighten up the descriptions of behaviour to make
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. */
{
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 95354ac..e05298a 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -13,7 +13,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.decls,v 1.122 2008/06/13 05:45:12 mistachkin Exp $
+# RCS: @(#) $Id: tclInt.decls,v 1.123 2008/07/08 17:52:17 dgp Exp $
library tcl
@@ -163,9 +163,10 @@ declare 34 generic {
# Tcl_Obj *TclGetIndexedScalar(Tcl_Interp *interp, int localIndex,
# int flags)
#}
-declare 36 generic {
- int TclGetLong(Tcl_Interp *interp, CONST char *str, long *longPtr)
-}
+# Removed in 8.6a2
+#declare 36 generic {
+# int TclGetLong(Tcl_Interp *interp, CONST char *str, long *longPtr)
+#}
declare 37 generic {
int TclGetLoadedPackages(Tcl_Interp *interp, char *targetName)
}
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index c8f788c..d21bd4d 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -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: tclIntDecls.h,v 1.116 2008/06/13 05:45:13 mistachkin Exp $
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.117 2008/07/08 17:52:17 dgp Exp $
*/
#ifndef _TCLINTDECLS
@@ -209,12 +209,7 @@ EXTERN int TclGetIntForIndex (Tcl_Interp * interp,
int * indexPtr);
#endif
/* Slot 35 is reserved */
-#ifndef TclGetLong_TCL_DECLARED
-#define TclGetLong_TCL_DECLARED
-/* 36 */
-EXTERN int TclGetLong (Tcl_Interp * interp, CONST char * str,
- long * longPtr);
-#endif
+/* Slot 36 is reserved */
#ifndef TclGetLoadedPackages_TCL_DECLARED
#define TclGetLoadedPackages_TCL_DECLARED
/* 37 */
@@ -1138,7 +1133,7 @@ typedef struct TclIntStubs {
void *reserved33;
int (*tclGetIntForIndex) (Tcl_Interp * interp, Tcl_Obj * objPtr, int endValue, int * indexPtr); /* 34 */
void *reserved35;
- int (*tclGetLong) (Tcl_Interp * interp, CONST char * str, long * longPtr); /* 36 */
+ void *reserved36;
int (*tclGetLoadedPackages) (Tcl_Interp * interp, char * targetName); /* 37 */
int (*tclGetNamespaceForQualName) (Tcl_Interp * interp, CONST char * qualName, Namespace * cxtNsPtr, int flags, Namespace ** nsPtrPtr, Namespace ** altNsPtrPtr, Namespace ** actualCxtPtrPtr, CONST char ** simpleNamePtr); /* 38 */
TclObjCmdProcType (*tclGetObjInterpProc) (void); /* 39 */
@@ -1478,10 +1473,7 @@ extern CONST TclIntStubs *tclIntStubsPtr;
(tclIntStubsPtr->tclGetIntForIndex) /* 34 */
#endif
/* Slot 35 is reserved */
-#ifndef TclGetLong
-#define TclGetLong \
- (tclIntStubsPtr->tclGetLong) /* 36 */
-#endif
+/* Slot 36 is reserved */
#ifndef TclGetLoadedPackages
#define TclGetLoadedPackages \
(tclIntStubsPtr->tclGetLoadedPackages) /* 37 */
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 2765182..b02c4d0 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStubInit.c,v 1.154 2008/06/13 05:45:14 mistachkin Exp $
+ * RCS: @(#) $Id: tclStubInit.c,v 1.155 2008/07/08 17:52:17 dgp Exp $
*/
#include "tclInt.h"
@@ -97,7 +97,7 @@ static const TclIntStubs tclIntStubs = {
NULL, /* 33 */
TclGetIntForIndex, /* 34 */
NULL, /* 35 */
- TclGetLong, /* 36 */
+ NULL, /* 36 */
TclGetLoadedPackages, /* 37 */
TclGetNamespaceForQualName, /* 38 */
TclGetObjInterpProc, /* 39 */