summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-10-06 19:33:03 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-10-06 19:33:03 (GMT)
commit0b1f6ed09a118b4d974ca8048adec672061662d1 (patch)
treedda00b3fc3eedbee6e11a3f382d2cea89a5bc77d /generic/tclProc.c
parentfa2cb7883beede585b4082ff56dc6cb16872553b (diff)
downloadtcl-0b1f6ed09a118b4d974ca8048adec672061662d1.zip
tcl-0b1f6ed09a118b4d974ca8048adec672061662d1.tar.gz
tcl-0b1f6ed09a118b4d974ca8048adec672061662d1.tar.bz2
Change "IntRep" to "InternalRep", as discussed in the Tcl Core mailing list
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r--generic/tclProc.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c
index b3de29a..402b752 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -67,19 +67,19 @@ const Tcl_ObjType tclProcBodyType = {
* should panic instead. */
};
-#define ProcSetIntRep(objPtr, procPtr) \
+#define ProcSetInternalRep(objPtr, procPtr) \
do { \
- Tcl_ObjIntRep ir; \
+ Tcl_ObjInternalRep ir; \
(procPtr)->refCount++; \
ir.twoPtrValue.ptr1 = (procPtr); \
ir.twoPtrValue.ptr2 = NULL; \
- Tcl_StoreIntRep((objPtr), &tclProcBodyType, &ir); \
+ Tcl_StoreInternalRep((objPtr), &tclProcBodyType, &ir); \
} while (0)
-#define ProcGetIntRep(objPtr, procPtr) \
+#define ProcGetInternalRep(objPtr, procPtr) \
do { \
- const Tcl_ObjIntRep *irPtr; \
- irPtr = TclFetchIntRep((objPtr), &tclProcBodyType); \
+ const Tcl_ObjInternalRep *irPtr; \
+ irPtr = TclFetchInternalRep((objPtr), &tclProcBodyType); \
(procPtr) = irPtr ? (Proc *)irPtr->twoPtrValue.ptr1 : NULL; \
} while (0)
@@ -113,19 +113,19 @@ static const Tcl_ObjType lambdaType = {
SetLambdaFromAny /* setFromAnyProc */
};
-#define LambdaSetIntRep(objPtr, procPtr, nsObjPtr) \
+#define LambdaSetInternalRep(objPtr, procPtr, nsObjPtr) \
do { \
- Tcl_ObjIntRep ir; \
+ Tcl_ObjInternalRep ir; \
ir.twoPtrValue.ptr1 = (procPtr); \
ir.twoPtrValue.ptr2 = (nsObjPtr); \
Tcl_IncrRefCount((nsObjPtr)); \
- Tcl_StoreIntRep((objPtr), &lambdaType, &ir); \
+ Tcl_StoreInternalRep((objPtr), &lambdaType, &ir); \
} while (0)
-#define LambdaGetIntRep(objPtr, procPtr, nsObjPtr) \
+#define LambdaGetInternalRep(objPtr, procPtr, nsObjPtr) \
do { \
- const Tcl_ObjIntRep *irPtr; \
- irPtr = TclFetchIntRep((objPtr), &lambdaType); \
+ const Tcl_ObjInternalRep *irPtr; \
+ irPtr = TclFetchInternalRep((objPtr), &lambdaType); \
(procPtr) = irPtr ? (Proc *)irPtr->twoPtrValue.ptr1 : NULL; \
(nsObjPtr) = irPtr ? (Tcl_Obj *)irPtr->twoPtrValue.ptr2 : NULL; \
} while (0)
@@ -327,7 +327,7 @@ Tcl_ProcObjCmd(
* of all procs whose argument list is just _args_
*/
- if (TclHasIntRep(objv[3], &tclProcBodyType)) {
+ if (TclHasInternalRep(objv[3], &tclProcBodyType)) {
goto done;
}
@@ -409,7 +409,7 @@ TclCreateProc(
Tcl_Obj **argArray;
int precompiled = 0;
- ProcGetIntRep(bodyPtr, procPtr);
+ ProcGetInternalRep(bodyPtr, procPtr);
if (procPtr != NULL) {
/*
* Because the body is a TclProProcBody, the actual body is already
@@ -724,7 +724,7 @@ TclGetFrame(
obj.length = strlen(name);
obj.typePtr = NULL;
result = TclObjGetFrame(interp, &obj, framePtrPtr);
- TclFreeIntRep(&obj);
+ TclFreeInternalRep(&obj);
return result;
}
@@ -762,7 +762,7 @@ TclObjGetFrame(
{
Interp *iPtr = (Interp *) interp;
int curLevel, level, result;
- const Tcl_ObjIntRep *irPtr;
+ const Tcl_ObjInternalRep *irPtr;
const char *name = NULL;
Tcl_WideInt w;
@@ -788,7 +788,7 @@ TclObjGetFrame(
level = curLevel - level;
result = 1;
}
- } else if ((irPtr = TclFetchIntRep(objPtr, &levelReferenceType))) {
+ } else if ((irPtr = TclFetchInternalRep(objPtr, &levelReferenceType))) {
level = irPtr->wideValue;
result = 1;
} else {
@@ -798,10 +798,10 @@ TclObjGetFrame(
if (level < 0 || (level > 0 && name[1] == '-')) {
result = -1;
} else {
- Tcl_ObjIntRep ir;
+ Tcl_ObjInternalRep ir;
ir.wideValue = level;
- Tcl_StoreIntRep(objPtr, &levelReferenceType, &ir);
+ Tcl_StoreInternalRep(objPtr, &levelReferenceType, &ir);
result = 1;
}
} else {
@@ -1151,7 +1151,7 @@ TclInitCompiledLocals(
ByteCode *codePtr;
bodyPtr = framePtr->procPtr->bodyPtr;
- ByteCodeGetIntRep(bodyPtr, &tclByteCodeType, codePtr);
+ ByteCodeGetInternalRep(bodyPtr, &tclByteCodeType, codePtr);
if (codePtr == NULL) {
Tcl_Panic("body object for proc attached to frame is not a byte code type");
}
@@ -1327,7 +1327,7 @@ InitLocalCache(
CompiledLocal *localPtr;
int isNew;
- ByteCodeGetIntRep(procPtr->bodyPtr, &tclByteCodeType, codePtr);
+ ByteCodeGetInternalRep(procPtr->bodyPtr, &tclByteCodeType, codePtr);
/*
* Cache the names and initial values of local variables; store the
@@ -1400,7 +1400,7 @@ InitArgsAndLocals(
int localCt = procPtr->numCompiledLocals, numArgs, argCt, i, imax;
Tcl_Obj *const *argObjs;
- ByteCodeGetIntRep(procPtr->bodyPtr, &tclByteCodeType, codePtr);
+ ByteCodeGetInternalRep(procPtr->bodyPtr, &tclByteCodeType, codePtr);
/*
* Make sure that the local cache of variable names and initial values has
@@ -1576,7 +1576,7 @@ TclPushProcCallFrame(
* local variables are found while compiling.
*/
- ByteCodeGetIntRep(procPtr->bodyPtr, &tclByteCodeType, codePtr);
+ ByteCodeGetInternalRep(procPtr->bodyPtr, &tclByteCodeType, codePtr);
if (codePtr != NULL) {
Interp *iPtr = (Interp *) interp;
@@ -1786,7 +1786,7 @@ TclNRInterpProcCore(
*/
procPtr->refCount++;
- ByteCodeGetIntRep(procPtr->bodyPtr, &tclByteCodeType, codePtr);
+ ByteCodeGetInternalRep(procPtr->bodyPtr, &tclByteCodeType, codePtr);
TclNRAddCallback(interp, InterpProcNR2, procNameObj, errorProc,
NULL, NULL);
@@ -1920,7 +1920,7 @@ TclProcCompileProc(
Tcl_CallFrame *framePtr;
ByteCode *codePtr;
- ByteCodeGetIntRep(bodyPtr, &tclByteCodeType, codePtr);
+ ByteCodeGetInternalRep(bodyPtr, &tclByteCodeType, codePtr);
/*
* If necessary, compile the procedure's body. The compiler will allocate
@@ -1955,7 +1955,7 @@ TclProcCompileProc(
codePtr->compileEpoch = iPtr->compileEpoch;
codePtr->nsPtr = nsPtr;
} else {
- Tcl_StoreIntRep(bodyPtr, &tclByteCodeType, NULL);
+ Tcl_StoreInternalRep(bodyPtr, &tclByteCodeType, NULL);
codePtr = NULL;
}
}
@@ -2312,7 +2312,7 @@ TclNewProcBodyObj(
TclNewObj(objPtr);
if (objPtr) {
- ProcSetIntRep(objPtr, procPtr);
+ ProcSetInternalRep(objPtr, procPtr);
}
return objPtr;
@@ -2341,9 +2341,9 @@ ProcBodyDup(
Tcl_Obj *dupPtr) /* Target object for the duplication. */
{
Proc *procPtr;
- ProcGetIntRep(srcPtr, procPtr);
+ ProcGetInternalRep(srcPtr, procPtr);
- ProcSetIntRep(dupPtr, procPtr);
+ ProcSetInternalRep(dupPtr, procPtr);
}
/*
@@ -2371,7 +2371,7 @@ ProcBodyFree(
{
Proc *procPtr;
- ProcGetIntRep(objPtr, procPtr);
+ ProcGetInternalRep(objPtr, procPtr);
if (procPtr->refCount-- <= 1) {
TclProcCleanupProc(procPtr);
@@ -2400,12 +2400,12 @@ DupLambdaInternalRep(
Proc *procPtr;
Tcl_Obj *nsObjPtr;
- LambdaGetIntRep(srcPtr, procPtr, nsObjPtr);
+ LambdaGetInternalRep(srcPtr, procPtr, nsObjPtr);
assert(procPtr != NULL);
procPtr->refCount++;
- LambdaSetIntRep(copyPtr, procPtr, nsObjPtr);
+ LambdaSetInternalRep(copyPtr, procPtr, nsObjPtr);
}
static void
@@ -2416,7 +2416,7 @@ FreeLambdaInternalRep(
Proc *procPtr;
Tcl_Obj *nsObjPtr;
- LambdaGetIntRep(objPtr, procPtr, nsObjPtr);
+ LambdaGetInternalRep(objPtr, procPtr, nsObjPtr);
assert(procPtr != NULL);
if (procPtr->refCount-- <= 1) {
@@ -2590,7 +2590,7 @@ SetLambdaFromAny(
* conversion to lambdaType.
*/
- LambdaSetIntRep(objPtr, procPtr, nsObjPtr);
+ LambdaSetInternalRep(objPtr, procPtr, nsObjPtr);
return TCL_OK;
}
@@ -2603,13 +2603,13 @@ TclGetLambdaFromObj(
Proc *procPtr;
Tcl_Obj *nsObjPtr;
- LambdaGetIntRep(objPtr, procPtr, nsObjPtr);
+ LambdaGetInternalRep(objPtr, procPtr, nsObjPtr);
if (procPtr == NULL) {
if (SetLambdaFromAny(interp, objPtr) != TCL_OK) {
return NULL;
}
- LambdaGetIntRep(objPtr, procPtr, nsObjPtr);
+ LambdaGetInternalRep(objPtr, procPtr, nsObjPtr);
}
assert(procPtr != NULL);