summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-26 07:29:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-26 07:29:02 (GMT)
commita4c35fb82f99d990ca1ef877cb9917c7f55151ff (patch)
treecdd02327448cf2c0393cbf3cea4fd48bb17e52c4 /generic/tclVar.c
parent81a213ed4ce77b15fbc6d5d97cc1235b689ad482 (diff)
parente12b1646c6f675cf09d5f1a72d4ecdffa5da7396 (diff)
downloadtcl-a4c35fb82f99d990ca1ef877cb9917c7f55151ff.zip
tcl-a4c35fb82f99d990ca1ef877cb9917c7f55151ff.tar.gz
tcl-a4c35fb82f99d990ca1ef877cb9917c7f55151ff.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r--generic/tclVar.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index d2b8227..6d948dd 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -200,7 +200,7 @@ static Tcl_Var ObjFindNamespaceVar(Tcl_Interp *interp,
int flags);
static int ObjMakeUpvar(Tcl_Interp *interp,
CallFrame *framePtr, Tcl_Obj *otherP1Ptr,
- const char *otherP2, const int otherFlags,
+ const char *otherP2, int otherFlags,
Tcl_Obj *myNamePtr, int myFlags, int index);
static ArraySearch * ParseSearchId(Tcl_Interp *interp, const Var *varPtr,
Tcl_Obj *varNamePtr, Tcl_Obj *handleObj);
@@ -224,7 +224,7 @@ static void SetArrayDefault(Var *arrayPtr, Tcl_Obj *defaultObj);
*/
MODULE_SCOPE Var * TclLookupSimpleVar(Tcl_Interp *interp,
- Tcl_Obj *varNamePtr, int flags, const int create,
+ Tcl_Obj *varNamePtr, int flags, int create,
const char **errMsgPtr, int *indexPtr);
static Tcl_DupInternalRepProc DupLocalVarName;
@@ -541,10 +541,10 @@ TclObjLookupVar(
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
+ 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
+ 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
@@ -591,10 +591,10 @@ TclObjLookupVarEx(
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
+ 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
+ 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
@@ -827,7 +827,7 @@ TclLookupSimpleVar(
int flags, /* Only TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
* TCL_AVOID_RESOLVERS and TCL_LEAVE_ERR_MSG
* bits matter. */
- const int create, /* If 1, create hash table entry for varname,
+ 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,
@@ -1062,15 +1062,15 @@ TclLookupArrayElement(
Tcl_Obj *arrayNamePtr, /* This is the name of the array, or NULL if
* index>= 0. */
Tcl_Obj *elNamePtr, /* Name of element within array. */
- const int flags, /* Only TCL_LEAVE_ERR_MSG bit matters. */
+ 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
+ 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
+ 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. */
@@ -1383,7 +1383,7 @@ TclPtrGetVar(
* the name of a variable. */
Tcl_Obj *part2Ptr, /* If non-NULL, gives the name of an element
* in the array part1. */
- const int flags) /* OR-ed combination of TCL_GLOBAL_ONLY, and
+ int flags) /* OR-ed combination of TCL_GLOBAL_ONLY, and
* TCL_LEAVE_ERR_MSG bits. */
{
if (varPtr == NULL) {
@@ -1429,7 +1429,7 @@ TclPtrGetVarIdx(
* the name of a variable. */
Tcl_Obj *part2Ptr, /* If non-NULL, gives the name of an element
* in the array part1. */
- const int flags, /* OR-ed combination of TCL_GLOBAL_ONLY, and
+ int flags, /* OR-ed combination of TCL_GLOBAL_ONLY, and
* TCL_LEAVE_ERR_MSG bits. */
int index) /* Index into the local variable table of the
* variable, or -1. Only used when part1Ptr is
@@ -1822,7 +1822,7 @@ TclPtrSetVar(
Tcl_Obj *part2Ptr, /* 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
+ int flags) /* OR-ed combination of TCL_GLOBAL_ONLY, and
* TCL_LEAVE_ERR_MSG bits. */
{
if (varPtr == NULL) {
@@ -2001,7 +2001,7 @@ TclPtrSetVarIdx(
Tcl_Obj *part2Ptr, /* 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
+ int flags, /* OR-ed combination of TCL_GLOBAL_ONLY, and
* TCL_LEAVE_ERR_MSG bits. */
int index) /* Index of local var where part1 is to be
* found. */
@@ -2247,7 +2247,7 @@ TclPtrIncrObjVar(
* 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:
+ 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. */
@@ -2303,7 +2303,7 @@ TclPtrIncrObjVarIdx(
* 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:
+ 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. */
@@ -2532,7 +2532,7 @@ TclPtrUnsetVar(
* the name of a variable. */
Tcl_Obj *part2Ptr, /* If non-NULL, gives the name of an element
* in the array part1. */
- const int flags) /* OR-ed combination of any of
+ int flags) /* OR-ed combination of any of
* TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
* TCL_LEAVE_ERR_MSG. */
{
@@ -2579,7 +2579,7 @@ TclPtrUnsetVarIdx(
* the name of a variable. */
Tcl_Obj *part2Ptr, /* If non-NULL, gives the name of an element
* in the array part1. */
- const int flags, /* OR-ed combination of any of
+ int flags, /* OR-ed combination of any of
* TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
* TCL_LEAVE_ERR_MSG. */
int index) /* Index into the local variable table of the
@@ -3191,7 +3191,7 @@ ArrayForNRCmd(
* Parse arguments.
*/
- if (Tcl_ListObjLength(interp, objv[1], &numVars) != TCL_OK) {
+ if (TclListObjLength(interp, objv[1], &numVars) != TCL_OK) {
return TCL_ERROR;
}
@@ -3302,7 +3302,7 @@ ArrayForLoopCallback(
goto arrayfordone;
}
- Tcl_ListObjGetElements(NULL, varListObj, &varc, &varv);
+ TclListObjGetElements(NULL, varListObj, &varc, &varv);
if (Tcl_ObjSetVar2(interp, varv[0], NULL, keyObj,
TCL_LEAVE_ERR_MSG) == NULL) {
result = TCL_ERROR;
@@ -3842,7 +3842,7 @@ ArrayGetCmd(
*/
TclNewObj(tmpResObj);
- result = Tcl_ListObjGetElements(interp, nameLstObj, &count, &nameObjPtr);
+ result = TclListObjGetElements(interp, nameLstObj, &count, &nameObjPtr);
if (result != TCL_OK) {
goto errorInArrayGet;
}
@@ -4373,7 +4373,7 @@ ArrayUnsetCmd(
Tcl_Obj *varNameObj, *patternObj, *nameObj;
Tcl_HashSearch search;
const char *pattern;
- const int unsetFlags = 0; /* Should this be TCL_LEAVE_ERR_MSG? */
+ int unsetFlags = 0; /* Should this be TCL_LEAVE_ERR_MSG? */
int isArray;
switch (objc) {
@@ -4552,7 +4552,7 @@ ObjMakeUpvar(
* 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:
+ int otherFlags, /* 0, TCL_GLOBAL_ONLY or TCL_NAMESPACE_ONLY:
* indicates scope of "other" variable. */
Tcl_Obj *myNamePtr, /* Name of variable which will refer to
* otherP1/otherP2. Must be a scalar. */