From 67aa8715c3ab84a6c636b90a48b5a565c1dcc162 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 4 Oct 2008 11:04:42 +0000 Subject: * doc/GetIndex.3: CONSTified the tablePtr argument * generic/tcl.decls: of Tcl_GetIndexFromObj. * generic/tclIndexObj.c * ChangeLog * generic/tclDecls.h: regenerated This change complies with TIP #27. --- ChangeLog | 9 +++++++++ doc/GetIndex.3 | 4 ++-- generic/tcl.decls | 4 ++-- generic/tclDecls.h | 7 ++++--- generic/tclIndexObj.c | 6 +++--- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index f83f5d2..79d990f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-10-4 Jan Nijtmans + + * doc/GetIndex.3: CONSTified the tablePtr argument + * generic/tcl.decls: of Tcl_GetIndexFromObj. + * generic/tclIndexObj.c + * ChangeLog + * generic/tclDecls.h: regenerated + This change complies with TIP #27. + 2008-10-03 Miguel Sofer * tests/stack.test: diff --git a/doc/GetIndex.3 b/doc/GetIndex.3 index 7a9f746..c0cf623 100644 --- a/doc/GetIndex.3 +++ b/doc/GetIndex.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetIndex.3,v 1.22 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: GetIndex.3,v 1.23 2008/10/04 11:04:42 nijtmans Exp $ '\" .so man.macros .TH Tcl_GetIndexFromObj 3 8.1 Tcl "Tcl Library Procedures" @@ -31,7 +31,7 @@ provided on errors. The string value of this object is used to search through \fItablePtr\fR. The internal representation is modified to hold the index of the matching table entry. -.AP "const char" **tablePtr in +.AP "const char *const" *tablePtr in An array of null-terminated strings. The end of the array is marked by a NULL string pointer. .AP "const void" *structTablePtr in diff --git a/generic/tcl.decls b/generic/tcl.decls index 03bde78..8f9f46a 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -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: tcl.decls,v 1.147 2008/10/03 00:05:22 dkf Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.148 2008/10/04 11:04:43 nijtmans Exp $ library tcl @@ -155,7 +155,7 @@ declare 35 generic { } declare 36 generic { int Tcl_GetIndexFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, - CONST84 char **tablePtr, CONST char *msg, int flags, int *indexPtr) + CONST84 char *CONST *tablePtr, CONST char *msg, int flags, int *indexPtr) } declare 37 generic { int Tcl_GetInt(Tcl_Interp *interp, CONST char *src, int *intPtr) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 7a1510c..f015e4c 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.149 2008/10/03 00:09:43 dkf Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.150 2008/10/04 11:04:43 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -266,7 +266,8 @@ EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, #define Tcl_GetIndexFromObj_TCL_DECLARED /* 36 */ EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, CONST84 char ** tablePtr, + Tcl_Obj * objPtr, + CONST84 char *CONST * tablePtr, CONST char * msg, int flags, int * indexPtr); #endif #ifndef Tcl_GetInt_TCL_DECLARED @@ -3719,7 +3720,7 @@ typedef struct TclStubs { unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 33 */ int (*tcl_GetDouble) (Tcl_Interp * interp, CONST char * src, double * doublePtr); /* 34 */ int (*tcl_GetDoubleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); /* 35 */ - int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char ** tablePtr, CONST char * msg, int flags, int * indexPtr); /* 36 */ + int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char *CONST * tablePtr, CONST char * msg, int flags, int * indexPtr); /* 36 */ int (*tcl_GetInt) (Tcl_Interp * interp, CONST char * src, int * intPtr); /* 37 */ int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index ce5ba81..91b9e3d 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -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: tclIndexObj.c,v 1.42 2008/10/03 08:13:14 dkf Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.43 2008/10/04 11:04:43 nijtmans Exp $ */ #include "tclInt.h" @@ -104,7 +104,7 @@ int Tcl_GetIndexFromObj( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr, /* Object containing the string to lookup. */ - const char **tablePtr, /* Array of strings to compare against the + const char *const*tablePtr, /* Array of strings to compare against the * value of objPtr; last entry must be NULL * and there must not be duplicate entries. */ const char *msg, /* Identifying word to use in error @@ -557,7 +557,7 @@ PrefixMatchObjCmd( Tcl_Obj *errorPtr = NULL; char *message = "option"; Tcl_Obj *tablePtr, *objPtr, *resultPtr; - static const char *matchOptions[] = { + static const char *const matchOptions[] = { "-error", "-exact", "-message", NULL }; enum matchOptions { -- cgit v0.12