summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r--generic/tclVar.c210
1 files changed, 105 insertions, 105 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 62337bf..13d5dc6 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclVar.c,v 1.126 2006/10/27 13:20:33 dkf Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.127 2007/02/20 23:24:03 nijtmans Exp $
*/
#include "tclInt.h"
@@ -25,17 +25,17 @@
* access is denied.
*/
-static CONST char *noSuchVar = "no such variable";
-static CONST char *isArray = "variable is array";
-static CONST char *needArray = "variable isn't array";
-static CONST char *noSuchElement = "no such element in array";
-static CONST char *danglingElement =
+static const char *noSuchVar = "no such variable";
+static const char *isArray = "variable is array";
+static const char *needArray = "variable isn't array";
+static const char *noSuchElement = "no such element in array";
+static const char *danglingElement =
"upvar refers to element in deleted array";
-static CONST char *danglingVar =
+static const char *danglingVar =
"upvar refers to variable in deleted namespace";
-static CONST char *badNamespace = "parent namespace doesn't exist";
-static CONST char *missingName = "missing variable name";
-static CONST char *isArrayElement =
+static const char *badNamespace = "parent namespace doesn't exist";
+static const char *missingName = "missing variable name";
+static const char *isArrayElement =
"name refers to an element in an array";
/*
@@ -50,18 +50,18 @@ static CONST char *isArrayElement =
*/
static void DeleteSearches(Var *arrayVarPtr);
-static void DeleteArray(Interp *iPtr, CONST char *arrayName,
+static void DeleteArray(Interp *iPtr, const char *arrayName,
Var *varPtr, int flags);
static int ObjMakeUpvar(Tcl_Interp *interp,
CallFrame *framePtr, Tcl_Obj *otherP1Ptr,
- CONST char *otherP2, CONST int otherFlags,
- CONST char *myName, int myFlags, int index);
+ const char *otherP2, const int otherFlags,
+ const char *myName, int myFlags, int index);
static Var * NewVar(void);
-static ArraySearch * ParseSearchId(Tcl_Interp *interp, CONST Var *varPtr,
- CONST char *varName, Tcl_Obj *handleObj);
+static ArraySearch * ParseSearchId(Tcl_Interp *interp, const Var *varPtr,
+ const char *varName, Tcl_Obj *handleObj);
static void UnsetVarStruct(Var *varPtr, Var *arrayPtr,
- Interp *iPtr, CONST char *part1,
- CONST char *part2, int flags);
+ Interp *iPtr, const char *part1,
+ const char *part2, int flags);
static int SetArraySearchObj(Tcl_Interp *interp, Tcl_Obj *objPtr);
/*
@@ -70,10 +70,10 @@ static int SetArraySearchObj(Tcl_Interp *interp, Tcl_Obj *objPtr);
*/
MODULE_SCOPE Var * TclLookupSimpleVar(Tcl_Interp *interp,
- CONST char *varName, int flags, CONST int create,
- CONST char **errMsgPtr, int *indexPtr);
+ const char *varName, int flags, const int create,
+ const char **errMsgPtr, int *indexPtr);
MODULE_SCOPE int TclObjUnsetVar2(Tcl_Interp *interp,
- Tcl_Obj *part1Ptr, CONST char *part2, int flags);
+ Tcl_Obj *part1Ptr, const char *part2, int flags);
static Tcl_DupInternalRepProc DupLocalVarName;
static Tcl_FreeInternalRepProc FreeParsedVarName;
@@ -187,14 +187,14 @@ Tcl_ObjType tclArraySearchType = {
Var *
TclLookupVar(
Tcl_Interp *interp, /* Interpreter to use for lookup. */
- CONST char *part1, /* If part2 isn't NULL, this is the name of an
+ const char *part1, /* If part2 isn't NULL, this is the name of an
* array. Otherwise, this is a full variable
* name that could include a parenthesized
* array element. */
- CONST char *part2, /* Name of element within array, or NULL. */
+ const char *part2, /* Name of element within array, or NULL. */
int flags, /* Only TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
* and TCL_LEAVE_ERR_MSG bits matter. */
- CONST char *msg, /* Verb to use in error messages, e.g. "read"
+ const char *msg, /* Verb to use in error messages, e.g. "read"
* or "set". Only needed if TCL_LEAVE_ERR_MSG
* is set in flags. */
int createPart1, /* If 1, create hash table entry for part 1 of
@@ -209,14 +209,14 @@ TclLookupVar(
* is set to NULL. */
{
Var *varPtr;
- CONST char *elName; /* Name of array element or NULL; may be same
+ const char *elName; /* Name of array element or NULL; may be same
* as part2, or may be openParen+1. */
int openParen, closeParen; /* If this function parses a name into array
* and index, these are the offsets to the
* parens around the index. Otherwise they are
* -1. */
- register CONST char *p;
- CONST char *errMsg = NULL;
+ register const char *p;
+ const char *errMsg = NULL;
int index;
#define VAR_NAME_BUF_SIZE 26
char buffer[VAR_NAME_BUF_SIZE];
@@ -340,16 +340,16 @@ TclObjLookupVar(
* array. Otherwise, this is a full variable
* name that could include a parenthesized
* array element. */
- CONST char *part2, /* Name of element within array, or NULL. */
+ const char *part2, /* Name of element within array, or NULL. */
int flags, /* Only TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
* and TCL_LEAVE_ERR_MSG bits matter. */
- CONST char *msg, /* Verb to use in error messages, e.g. "read"
+ const char *msg, /* Verb to use in error messages, e.g. "read"
* or "set". Only needed if TCL_LEAVE_ERR_MSG
* is set in flags. */
- CONST int createPart1, /* If 1, create hash table entry for part 1 of
+ const int createPart1, /* If 1, create hash table entry for part 1 of
* name, if it doesn't already exist. If 0,
* return error if it doesn't exist. */
- CONST int createPart2, /* If 1, create hash table entry for part 2 of
+ const int createPart2, /* If 1, create hash table entry for part 2 of
* name, if it doesn't already exist. If 0,
* return error if it doesn't exist. */
Var **arrayPtrPtr) /* If the name refers to an element of an
@@ -364,8 +364,8 @@ TclObjLookupVar(
int index, len1, len2;
int parsed = 0;
Tcl_Obj *objPtr;
- Tcl_ObjType *typePtr = part1Ptr->typePtr;
- CONST char *errMsg = NULL;
+ const Tcl_ObjType *typePtr = part1Ptr->typePtr;
+ const char *errMsg = NULL;
CallFrame *varFramePtr = iPtr->varFramePtr;
Namespace *nsPtr;
@@ -659,15 +659,15 @@ TclObjLookupVar(
Var *
TclLookupSimpleVar(
Tcl_Interp *interp, /* Interpreter to use for lookup. */
- CONST char *varName, /* This is a simple variable name that could
+ const char *varName, /* This is a simple variable name that could
* represent a scalar or an array. */
int flags, /* Only TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
* LOOKUP_FOR_UPVAR and TCL_LEAVE_ERR_MSG bits
* matter. */
- CONST int create, /* If 1, create hash table entry for varname,
+ const int create, /* If 1, create hash table entry for varname,
* if it doesn't already exist. If 0, return
* error if it doesn't exist. */
- CONST char **errMsgPtr,
+ const char **errMsgPtr,
int *indexPtr)
{
Interp *iPtr = (Interp *) interp;
@@ -747,7 +747,7 @@ TclLookupSimpleVar(
if (((flags & (TCL_GLOBAL_ONLY | TCL_NAMESPACE_ONLY)) != 0)
|| !HasLocalVars(varFramePtr)
|| (strstr(varName, "::") != NULL)) {
- CONST char *tail;
+ const char *tail;
int lookGlobal;
lookGlobal = (flags & TCL_GLOBAL_ONLY)
@@ -903,17 +903,17 @@ TclLookupSimpleVar(
Var *
TclLookupArrayElement(
Tcl_Interp *interp, /* Interpreter to use for lookup. */
- CONST char *arrayName, /* This is the name of the array. */
- CONST char *elName, /* Name of element within array. */
- CONST int flags, /* Only TCL_LEAVE_ERR_MSG bit matters. */
- CONST char *msg, /* Verb to use in error messages, e.g. "read"
+ const char *arrayName, /* This is the name of the array. */
+ const char *elName, /* Name of element within array. */
+ const int flags, /* Only TCL_LEAVE_ERR_MSG bit matters. */
+ const char *msg, /* Verb to use in error messages, e.g. "read"
* or "set". Only needed if TCL_LEAVE_ERR_MSG
* is set in flags. */
- CONST int createArray, /* If 1, transform arrayName to be an array if
+ const int createArray, /* If 1, transform arrayName to be an array if
* it isn't one yet and the transformation is
* possible. If 0, return error if it isn't
* already an array. */
- CONST int createElem, /* If 1, create hash table entry for the
+ const int createElem, /* If 1, create hash table entry for the
* element, if it doesn't already exist. If 0,
* return error if it doesn't exist. */
Var *arrayPtr) /* Pointer to the array's Var structure. */
@@ -1005,11 +1005,11 @@ TclLookupArrayElement(
*----------------------------------------------------------------------
*/
-CONST char *
+const char *
Tcl_GetVar(
Tcl_Interp *interp, /* Command interpreter in which varName is to
* be looked up. */
- CONST char *varName, /* Name of a variable in interp. */
+ const char *varName, /* Name of a variable in interp. */
int flags) /* OR-ed combination of TCL_GLOBAL_ONLY,
* TCL_NAMESPACE_ONLY or TCL_LEAVE_ERR_MSG
* bits. */
@@ -1040,13 +1040,13 @@ Tcl_GetVar(
*----------------------------------------------------------------------
*/
-CONST char *
+const char *
Tcl_GetVar2(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be looked up. */
- CONST char *part1, /* Name of an array (if part2 is non-NULL) or
+ const char *part1, /* Name of an array (if part2 is non-NULL) or
* the name of a variable. */
- CONST char *part2, /* If non-NULL, gives the name of an element
+ const char *part2, /* If non-NULL, gives the name of an element
* in the array part1. */
int flags) /* OR-ed combination of TCL_GLOBAL_ONLY,
* TCL_NAMESPACE_ONLY and TCL_LEAVE_ERR_MSG *
@@ -1088,9 +1088,9 @@ Tcl_Obj *
Tcl_GetVar2Ex(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be looked up. */
- CONST char *part1, /* Name of an array (if part2 is non-NULL) or
+ const char *part1, /* Name of an array (if part2 is non-NULL) or
* the name of a variable. */
- CONST char *part2, /* If non-NULL, gives the name of an element
+ const char *part2, /* If non-NULL, gives the name of an element
* in the array part1. */
int flags) /* OR-ed combination of TCL_GLOBAL_ONLY, and
* TCL_LEAVE_ERR_MSG bits. */
@@ -1200,15 +1200,15 @@ TclPtrGetVar(
register Var *varPtr, /* The variable to be read.*/
Var *arrayPtr, /* NULL for scalar variables, pointer to the
* containing array otherwise. */
- CONST char *part1, /* Name of an array (if part2 is non-NULL) or
+ const char *part1, /* Name of an array (if part2 is non-NULL) or
* the name of a variable. */
- CONST char *part2, /* If non-NULL, gives the name of an element
+ const char *part2, /* If non-NULL, gives the name of an element
* in the array part1. */
- CONST int flags) /* OR-ed combination of TCL_GLOBAL_ONLY, and
+ const int flags) /* OR-ed combination of TCL_GLOBAL_ONLY, and
* TCL_LEAVE_ERR_MSG bits. */
{
Interp *iPtr = (Interp *) interp;
- CONST char *msg;
+ const char *msg;
/*
* Invoke any traces that have been set for the variable.
@@ -1278,7 +1278,7 @@ Tcl_SetObjCmd(
ClientData dummy, /* Not used. */
register Tcl_Interp *interp,/* Current interpreter. */
int objc, /* Number of arguments. */
- Tcl_Obj *CONST objv[]) /* Argument objects. */
+ Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *varValueObj;
@@ -1327,12 +1327,12 @@ Tcl_SetObjCmd(
*----------------------------------------------------------------------
*/
-CONST char *
+const char *
Tcl_SetVar(
Tcl_Interp *interp, /* Command interpreter in which varName is to
* be looked up. */
- CONST char *varName, /* Name of a variable in interp. */
- CONST char *newValue, /* New value for varName. */
+ const char *varName, /* Name of a variable in interp. */
+ const char *newValue, /* New value for varName. */
int flags) /* Various flags that tell how to set value:
* any of TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
* TCL_APPEND_VALUE, TCL_LIST_ELEMENT,
@@ -1367,16 +1367,16 @@ Tcl_SetVar(
*----------------------------------------------------------------------
*/
-CONST char *
+const char *
Tcl_SetVar2(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be looked up. */
- CONST char *part1, /* If part2 is NULL, this is name of scalar
+ const char *part1, /* If part2 is NULL, this is name of scalar
* variable. Otherwise it is the name of an
* array. */
- CONST char *part2, /* Name of an element within an array, or
+ const char *part2, /* Name of an element within an array, or
* NULL. */
- CONST char *newValue, /* New value for variable. */
+ const char *newValue, /* New value for variable. */
int flags) /* Various flags that tell how to set value:
* any of TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
* TCL_APPEND_VALUE, TCL_LIST_ELEMENT, or
@@ -1441,9 +1441,9 @@ Tcl_Obj *
Tcl_SetVar2Ex(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be found. */
- CONST char *part1, /* Name of an array (if part2 is non-NULL) or
+ const char *part1, /* Name of an array (if part2 is non-NULL) or
* the name of a variable. */
- CONST char *part2, /* If non-NULL, gives the name of an element
+ const char *part2, /* If non-NULL, gives the name of an element
* in the array part1. */
Tcl_Obj *newValuePtr, /* New value for variable. */
int flags) /* Various flags that tell how to set value:
@@ -1558,12 +1558,12 @@ TclPtrSetVar(
Var *arrayPtr, /* Reference to the array containing the
* variable, or NULL if the variable is a
* scalar. */
- CONST char *part1, /* Name of an array (if part2 is non-NULL) or
+ const char *part1, /* Name of an array (if part2 is non-NULL) or
* the name of a variable. */
- CONST char *part2, /* If non-NULL, gives the name of an element
+ const char *part2, /* If non-NULL, gives the name of an element
* in the array part1. */
Tcl_Obj *newValuePtr, /* New value for variable. */
- CONST int flags) /* OR-ed combination of TCL_GLOBAL_ONLY, and
+ const int flags) /* OR-ed combination of TCL_GLOBAL_ONLY, and
* TCL_LEAVE_ERR_MSG bits. */
{
Interp *iPtr = (Interp *) interp;
@@ -1823,15 +1823,15 @@ TclPtrIncrObjVar(
Var *arrayPtr, /* Reference to the array containing the
* variable, or NULL if the variable is a
* scalar. */
- CONST char *part1, /* Points to an object holding the name of an
+ const char *part1, /* Points to an object holding the name of an
* array (if part2 is non-NULL) or the name of
* a variable. */
- CONST char *part2, /* If non-null, points to an object holding
+ const char *part2, /* If non-null, points to an object holding
* the name of an element in the array
* part1Ptr. */
Tcl_Obj *incrPtr, /* Increment value */
/* TODO: Which of these flag values really make sense? */
- CONST int flags) /* Various flags that tell how to incr value:
+ const int flags) /* Various flags that tell how to incr value:
* any of TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
* TCL_APPEND_VALUE, TCL_LIST_ELEMENT,
* TCL_LEAVE_ERR_MSG. */
@@ -1885,7 +1885,7 @@ int
Tcl_UnsetVar(
Tcl_Interp *interp, /* Command interpreter in which varName is to
* be looked up. */
- CONST char *varName, /* Name of a variable in interp. May be either
+ const char *varName, /* Name of a variable in interp. May be either
* a scalar name or an array name or an
* element in an array. */
int flags) /* OR-ed combination of any of
@@ -1920,8 +1920,8 @@ int
Tcl_UnsetVar2(
Tcl_Interp *interp, /* Command interpreter in which varName is to
* be looked up. */
- CONST char *part1, /* Name of variable or array. */
- CONST char *part2, /* Name of element within array or NULL. */
+ const char *part1, /* Name of variable or array. */
+ const char *part2, /* Name of element within array or NULL. */
int flags) /* OR-ed combination of any of
* TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
* TCL_LEAVE_ERR_MSG. */
@@ -1963,7 +1963,7 @@ TclObjUnsetVar2(
Tcl_Interp *interp, /* Command interpreter in which varName is to
* be looked up. */
Tcl_Obj *part1Ptr, /* Name of variable or array. */
- CONST char *part2, /* Name of element within array or NULL. */
+ const char *part2, /* Name of element within array or NULL. */
int flags) /* OR-ed combination of any of
* TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
* TCL_LEAVE_ERR_MSG. */
@@ -2053,8 +2053,8 @@ UnsetVarStruct(
Var *varPtr,
Var *arrayPtr,
Interp *iPtr,
- CONST char *part1,
- CONST char *part2,
+ const char *part1,
+ const char *part2,
int flags)
{
Var dummyVar;
@@ -2203,7 +2203,7 @@ Tcl_UnsetObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
- Tcl_Obj *CONST objv[]) /* Argument objects. */
+ Tcl_Obj *const objv[]) /* Argument objects. */
{
register int i, flags = TCL_LEAVE_ERR_MSG;
register char *name;
@@ -2271,7 +2271,7 @@ Tcl_AppendObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
- Tcl_Obj *CONST objv[]) /* Argument objects. */
+ Tcl_Obj *const objv[]) /* Argument objects. */
{
Var *varPtr, *arrayPtr;
char *part1;
@@ -2339,7 +2339,7 @@ Tcl_LappendObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
- Tcl_Obj *CONST objv[]) /* Argument objects. */
+ Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *varValuePtr, *newValuePtr;
int numElems, createdNewObj;
@@ -2481,7 +2481,7 @@ Tcl_ArrayObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
- Tcl_Obj *CONST objv[]) /* Argument objects. */
+ Tcl_Obj *const objv[]) /* Argument objects. */
{
/*
* The list of constants below should match the arrayOptions string array
@@ -2493,7 +2493,7 @@ Tcl_ArrayObjCmd(
ARRAY_NAMES, ARRAY_NEXTELEMENT, ARRAY_SET, ARRAY_SIZE,
ARRAY_STARTSEARCH, ARRAY_STATISTICS, ARRAY_UNSET
};
- static CONST char *arrayOptions[] = {
+ static const char *arrayOptions[] = {
"anymore", "donesearch", "exists", "get", "names", "nextelement",
"set", "size", "startsearch", "statistics", "unset", NULL
};
@@ -2810,7 +2810,7 @@ Tcl_ArrayObjCmd(
char *name;
Tcl_Obj *namePtr, *resultPtr;
int mode, matched = 0;
- static CONST char *options[] = {
+ static const char *options[] = {
"-exact", "-glob", "-regexp", NULL
};
enum options { OPT_EXACT, OPT_GLOB, OPT_REGEXP };
@@ -2973,7 +2973,7 @@ Tcl_ArrayObjCmd(
}
case ARRAY_STATISTICS: {
- CONST char *stats;
+ const char *stats;
if (notArray) {
goto error;
@@ -3194,10 +3194,10 @@ ObjMakeUpvar(
CallFrame *framePtr, /* Call frame containing "other" variable.
* NULL means use global :: context. */
Tcl_Obj *otherP1Ptr,
- CONST char *otherP2, /* Two-part name of variable in framePtr. */
- CONST int otherFlags, /* 0, TCL_GLOBAL_ONLY or TCL_NAMESPACE_ONLY:
+ const char *otherP2, /* Two-part name of variable in framePtr. */
+ const int otherFlags, /* 0, TCL_GLOBAL_ONLY or TCL_NAMESPACE_ONLY:
* indicates scope of "other" variable. */
- CONST char *myName, /* Name of variable which will refer to
+ const char *myName, /* Name of variable which will refer to
* otherP1/otherP2. Must be a scalar. */
int myFlags, /* 0, TCL_GLOBAL_ONLY or TCL_NAMESPACE_ONLY:
* indicates scope of myName. */
@@ -3280,7 +3280,7 @@ TclPtrMakeUpvar(
Tcl_Interp *interp, /* Interpreter containing variables. Used for
* error messages, too. */
Var *otherPtr, /* Pointer to the variable being linked-to */
- CONST char *myName, /* Name of variable which will refer to
+ const char *myName, /* Name of variable which will refer to
* otherP1/otherP2. Must be a scalar. */
int myFlags, /* 0, TCL_GLOBAL_ONLY or TCL_NAMESPACE_ONLY:
* indicates scope of myName. */
@@ -3290,8 +3290,8 @@ TclPtrMakeUpvar(
Interp *iPtr = (Interp *) interp;
CallFrame *varFramePtr = iPtr->varFramePtr;
Var *varPtr;
- CONST char *errMsg;
- CONST char *p;
+ const char *errMsg;
+ const char *p;
if (index >= 0) {
if (!HasLocalVars(varFramePtr)) {
@@ -3402,12 +3402,12 @@ int
Tcl_UpVar(
Tcl_Interp *interp, /* Command interpreter in which varName is to
* be looked up. */
- CONST char *frameName, /* Name of the frame containing the source
+ const char *frameName, /* Name of the frame containing the source
* variable, such as "1" or "#0". */
- CONST char *varName, /* Name of a variable in interp to link to.
+ const char *varName, /* Name of a variable in interp to link to.
* May be either a scalar name or an element
* in an array. */
- CONST char *localName, /* Name of link variable. */
+ const char *localName, /* Name of link variable. */
int flags) /* 0, TCL_GLOBAL_ONLY or TCL_NAMESPACE_ONLY:
* indicates scope of localName. */
{
@@ -3438,12 +3438,12 @@ int
Tcl_UpVar2(
Tcl_Interp *interp, /* Interpreter containing variables. Used for
* error messages too. */
- CONST char *frameName, /* Name of the frame containing the source
+ const char *frameName, /* Name of the frame containing the source
* variable, such as "1" or "#0". */
- CONST char *part1,
- CONST char *part2, /* Two parts of source variable name to link
+ const char *part1,
+ const char *part2, /* Two parts of source variable name to link
* to. */
- CONST char *localName, /* Name of link variable. */
+ const char *localName, /* Name of link variable. */
int flags) /* 0, TCL_GLOBAL_ONLY or TCL_NAMESPACE_ONLY:
* indicates scope of localName. */
{
@@ -3540,7 +3540,7 @@ Tcl_GlobalObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
- Tcl_Obj *CONST objv[]) /* Argument objects. */
+ Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
register Tcl_Obj *objPtr;
@@ -3637,7 +3637,7 @@ Tcl_VariableObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
- Tcl_Obj *CONST objv[]) /* Argument objects. */
+ Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
char *varName, *tail, *cp;
@@ -3764,7 +3764,7 @@ Tcl_UpvarObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
- Tcl_Obj *CONST objv[]) /* Argument objects. */
+ Tcl_Obj *const objv[]) /* Argument objects. */
{
CallFrame *framePtr;
char *localName;
@@ -3938,8 +3938,8 @@ SetArraySearchObj(
static ArraySearch *
ParseSearchId(
Tcl_Interp *interp, /* Interpreter containing variable. */
- CONST Var *varPtr, /* Array variable search is for. */
- CONST char *varName, /* Name of array variable that search is
+ const Var *varPtr, /* Array variable search is for. */
+ const char *varName, /* Name of array variable that search is
* supposed to be for. */
Tcl_Obj *handleObj) /* Object containing id of search. Must have
* form "search-num-var" where "num" is a
@@ -4377,7 +4377,7 @@ TclDeleteCompiledLocalVars(
static void
DeleteArray(
Interp *iPtr, /* Interpreter containing array. */
- CONST char *arrayName, /* Name of array (used for trace callbacks) */
+ const char *arrayName, /* Name of array (used for trace callbacks) */
Var *varPtr, /* Pointer to variable structure. */
int flags) /* Flags to pass to TclCallVarTraces:
* TCL_TRACE_UNSETS and sometimes
@@ -4510,11 +4510,11 @@ TclCleanupVar(
void
TclVarErrMsg(
Tcl_Interp *interp, /* Interpreter in which to record message. */
- CONST char *part1,
- CONST char *part2, /* Variable's two-part name. */
- CONST char *operation, /* String describing operation that failed,
+ const char *part1,
+ const char *part2, /* Variable's two-part name. */
+ const char *operation, /* String describing operation that failed,
* e.g. "read", "set", or "unset". */
- CONST char *reason) /* String describing why operation failed. */
+ const char *reason) /* String describing why operation failed. */
{
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "can't ", operation, " \"", part1, NULL);