summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-02-28 05:11:24 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-02-28 05:11:24 (GMT)
commite74c02673aec97beeb6f8ae55376bd5b88d9e3cc (patch)
tree2b9c586de5573bc73d089f27034488ef9f4f1972 /generic
parentdfa5329058b763cbe42687ceba9095b5b13c5c2a (diff)
downloadtcl-e74c02673aec97beeb6f8ae55376bd5b88d9e3cc.zip
tcl-e74c02673aec97beeb6f8ae55376bd5b88d9e3cc.tar.gz
tcl-e74c02673aec97beeb6f8ae55376bd5b88d9e3cc.tar.bz2
* doc/GetIndex.3:
* generic/tcl.decls (Tcl_GetIndexFromObjStruct): * generic/tclIndexObj.c (Tcl_GetIndexFromObjStruct): Revised the prototype of the Tcl_GetIndexFromObjStruct to take its struct table as a (CONST VOID *) argument, better describing what it is, maintaining source compatibility, and adding CONST correctness according to TIP 27. Thanks to Joe English for an elegant solution. [Bug 520304] * generic/tclDecls.h: make genstubs
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.decls4
-rw-r--r--generic/tclDecls.h6
-rw-r--r--generic/tclIndexObj.c6
3 files changed, 8 insertions, 8 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index cc380ae..120f888 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -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: tcl.decls,v 1.84 2002/02/20 18:46:29 dgp Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.85 2002/02/28 05:11:25 dgp Exp $
library tcl
@@ -1086,7 +1086,7 @@ declare 303 generic {
}
declare 304 generic {
int Tcl_GetIndexFromObjStruct(Tcl_Interp *interp, Tcl_Obj *objPtr,
- CONST84 char **tablePtr, int offset, CONST char *msg, int flags,
+ CONST VOID *tablePtr, int offset, CONST char *msg, int flags,
int *indexPtr)
}
declare 305 generic {
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 65cc00b..e3f46ba 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -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: tclDecls.h,v 1.84 2002/02/20 18:46:29 dgp Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.85 2002/02/28 05:11:25 dgp Exp $
*/
#ifndef _TCLDECLS
@@ -987,7 +987,7 @@ EXTERN void Tcl_GetEncodingNames _ANSI_ARGS_((
/* 304 */
EXTERN int Tcl_GetIndexFromObjStruct _ANSI_ARGS_((
Tcl_Interp * interp, Tcl_Obj * objPtr,
- CONST84 char ** tablePtr, int offset,
+ CONST VOID * tablePtr, int offset,
CONST char * msg, int flags, int * indexPtr));
/* 305 */
EXTERN VOID * Tcl_GetThreadData _ANSI_ARGS_((
@@ -1916,7 +1916,7 @@ typedef struct TclStubs {
Tcl_Encoding (*tcl_GetEncoding) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name)); /* 301 */
CONST char * (*tcl_GetEncodingName) _ANSI_ARGS_((Tcl_Encoding encoding)); /* 302 */
void (*tcl_GetEncodingNames) _ANSI_ARGS_((Tcl_Interp * interp)); /* 303 */
- int (*tcl_GetIndexFromObjStruct) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char ** tablePtr, int offset, CONST char * msg, int flags, int * indexPtr)); /* 304 */
+ int (*tcl_GetIndexFromObjStruct) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, CONST VOID * tablePtr, int offset, CONST char * msg, int flags, int * indexPtr)); /* 304 */
VOID * (*tcl_GetThreadData) _ANSI_ARGS_((Tcl_ThreadDataKey * keyPtr, int size)); /* 305 */
Tcl_Obj * (*tcl_GetVar2Ex) _ANSI_ARGS_((Tcl_Interp * interp, char * part1, char * part2, int flags)); /* 306 */
ClientData (*tcl_InitNotifier) _ANSI_ARGS_((void)); /* 307 */
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index fbddce9..5891aeb 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIndexObj.c,v 1.15 2002/02/16 00:37:54 hobbs Exp $
+ * RCS: @(#) $Id: tclIndexObj.c,v 1.16 2002/02/28 05:11:25 dgp Exp $
*/
#include "tclInt.h"
@@ -161,7 +161,7 @@ Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags,
indexPtr)
Tcl_Interp *interp; /* Used for error reporting if not NULL. */
Tcl_Obj *objPtr; /* Object containing the string to lookup. */
- CONST char **tablePtr; /* The first string in the table. The second
+ CONST VOID *tablePtr; /* The first string in the table. The second
* string will be at this address plus the
* offset, the third plus the offset again,
* etc. The last entry must be NULL
@@ -274,7 +274,7 @@ Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags,
resultPtr = Tcl_GetObjResult(interp);
Tcl_AppendStringsToObj(resultPtr,
(numAbbrev > 1) ? "ambiguous " : "bad ", msg, " \"",
- key, "\": must be ", *tablePtr, (char *) NULL);
+ key, "\": must be ", STRING_AT(tablePtr,offset,0), (char*)NULL);
for (entryPtr = NEXT_ENTRY(tablePtr, offset), count = 0;
*entryPtr != NULL;
entryPtr = NEXT_ENTRY(entryPtr, offset), count++) {