@@ -36,7 +36,7 @@ static void PrintUsage(Tcl_Interp *interp,
36
36
* that can be invoked by generic object code.
37
37
*/
38
38
39
- static const Tcl_ObjType indexType = {
39
+ const Tcl_ObjType tclIndexType = {
40
40
"index" , /* name */
41
41
FreeIndex , /* freeIntRepProc */
42
42
DupIndex , /* dupIntRepProc */
@@ -116,7 +116,7 @@ Tcl_GetIndexFromObj(
116
116
* the common case where the result is cached).
117
117
*/
118
118
119
- const Tcl_ObjInternalRep * irPtr = TclFetchInternalRep (objPtr , & indexType );
119
+ const Tcl_ObjInternalRep * irPtr = TclFetchInternalRep (objPtr , & tclIndexType );
120
120
121
121
if (irPtr ) {
122
122
IndexRep * indexRep = (IndexRep * )irPtr -> twoPtrValue .ptr1 ;
@@ -278,7 +278,7 @@ Tcl_GetIndexFromObjStruct(
278
278
*/
279
279
280
280
if (objPtr && !(flags & TCL_INDEX_TEMP_TABLE )) {
281
- irPtr = TclFetchInternalRep (objPtr , & indexType );
281
+ irPtr = TclFetchInternalRep (objPtr , & tclIndexType );
282
282
if (irPtr ) {
283
283
indexRep = (IndexRep * )irPtr -> twoPtrValue .ptr1 ;
284
284
if ((indexRep -> tablePtr == tablePtr )
@@ -347,15 +347,15 @@ Tcl_GetIndexFromObjStruct(
347
347
*/
348
348
349
349
if (objPtr && (index >= 0 ) && !(flags & TCL_INDEX_TEMP_TABLE )) {
350
- irPtr = TclFetchInternalRep (objPtr , & indexType );
350
+ irPtr = TclFetchInternalRep (objPtr , & tclIndexType );
351
351
if (irPtr ) {
352
352
indexRep = (IndexRep * )irPtr -> twoPtrValue .ptr1 ;
353
353
} else {
354
354
Tcl_ObjInternalRep ir ;
355
355
356
356
indexRep = (IndexRep * )ckalloc (sizeof (IndexRep ));
357
357
ir .twoPtrValue .ptr1 = indexRep ;
358
- Tcl_StoreInternalRep (objPtr , & indexType , & ir );
358
+ Tcl_StoreInternalRep (objPtr , & tclIndexType , & ir );
359
359
}
360
360
indexRep -> tablePtr = (void * ) tablePtr ;
361
361
indexRep -> offset = offset ;
@@ -447,7 +447,7 @@ static void
447
447
UpdateStringOfIndex (
448
448
Tcl_Obj * objPtr )
449
449
{
450
- IndexRep * indexRep = (IndexRep * )TclFetchInternalRep (objPtr , & indexType )-> twoPtrValue .ptr1 ;
450
+ IndexRep * indexRep = (IndexRep * )TclFetchInternalRep (objPtr , & tclIndexType )-> twoPtrValue .ptr1 ;
451
451
const char * indexStr = EXPAND_OF (indexRep );
452
452
453
453
Tcl_InitStringRep (objPtr , indexStr , strlen (indexStr ));
@@ -479,11 +479,11 @@ DupIndex(
479
479
Tcl_ObjInternalRep ir ;
480
480
IndexRep * dupIndexRep = (IndexRep * )ckalloc (sizeof (IndexRep ));
481
481
482
- memcpy (dupIndexRep , TclFetchInternalRep (srcPtr , & indexType )-> twoPtrValue .ptr1 ,
482
+ memcpy (dupIndexRep , TclFetchInternalRep (srcPtr , & tclIndexType )-> twoPtrValue .ptr1 ,
483
483
sizeof (IndexRep ));
484
484
485
485
ir .twoPtrValue .ptr1 = dupIndexRep ;
486
- Tcl_StoreInternalRep (dupPtr , & indexType , & ir );
486
+ Tcl_StoreInternalRep (dupPtr , & tclIndexType , & ir );
487
487
}
488
488
489
489
/*
@@ -507,7 +507,7 @@ static void
507
507
FreeIndex (
508
508
Tcl_Obj * objPtr )
509
509
{
510
- ckfree (TclFetchInternalRep (objPtr , & indexType )-> twoPtrValue .ptr1 );
510
+ ckfree (TclFetchInternalRep (objPtr , & tclIndexType )-> twoPtrValue .ptr1 );
511
511
objPtr -> typePtr = NULL ;
512
512
}
513
513
@@ -950,7 +950,7 @@ Tcl_WrongNumArgs(
950
950
*/
951
951
const Tcl_ObjInternalRep * irPtr ;
952
952
953
- if ((irPtr = TclFetchInternalRep (origObjv [i ], & indexType ))) {
953
+ if ((irPtr = TclFetchInternalRep (origObjv [i ], & tclIndexType ))) {
954
954
IndexRep * indexRep = (IndexRep * )irPtr -> twoPtrValue .ptr1 ;
955
955
956
956
elementStr = EXPAND_OF (indexRep );
@@ -999,7 +999,7 @@ Tcl_WrongNumArgs(
999
999
*/
1000
1000
const Tcl_ObjInternalRep * irPtr ;
1001
1001
1002
- if ((irPtr = TclFetchInternalRep (objv [i ], & indexType ))) {
1002
+ if ((irPtr = TclFetchInternalRep (objv [i ], & tclIndexType ))) {
1003
1003
IndexRep * indexRep = (IndexRep * )irPtr -> twoPtrValue .ptr1 ;
1004
1004
1005
1005
Tcl_AppendStringsToObj (objPtr , EXPAND_OF (indexRep ), NULL );
@@ -1445,7 +1445,7 @@ TclGetCompletionCodeFromObj(
1445
1445
"ok" , "error" , "return" , "break" , "continue" , NULL
1446
1446
};
1447
1447
1448
- if (!TclHasInternalRep (value , & indexType )
1448
+ if (!TclHasInternalRep (value , & tclIndexType )
1449
1449
&& TclGetIntFromObj (NULL , value , codePtr ) == TCL_OK ) {
1450
1450
return TCL_OK ;
1451
1451
}
0 commit comments