summaryrefslogtreecommitdiffstats
path: root/generic/tclOOCall.c
diff options
context:
space:
mode:
authorkjnash <k.j.nash@usa.net>2022-08-31 16:19:00 (GMT)
committerkjnash <k.j.nash@usa.net>2022-08-31 16:19:00 (GMT)
commitbca70ca3acaed162e49bc7616b7da4001c7fee41 (patch)
treee7f53f796bd576d7231fed8db0aa533ae65f59b6 /generic/tclOOCall.c
parent7e2bd5e5052a3fa8f5ee01c05e56fadf4cdfc592 (diff)
parent6cf74d1492b68e11b5a4cccf559ec5f69836b67b (diff)
downloadtcl-bca70ca3acaed162e49bc7616b7da4001c7fee41.zip
tcl-bca70ca3acaed162e49bc7616b7da4001c7fee41.tar.gz
tcl-bca70ca3acaed162e49bc7616b7da4001c7fee41.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclOOCall.c')
-rw-r--r--generic/tclOOCall.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index b7df93e..a9ed6bf 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -91,7 +91,7 @@ typedef struct {
static void AddClassFiltersToCallContext(Object *const oPtr,
Class *clsPtr, struct ChainBuilder *const cbPtr,
Tcl_HashTable *const doneFilters, int flags);
-static void AddClassMethodNames(Class *clsPtr, const int flags,
+static void AddClassMethodNames(Class *clsPtr, int flags,
Tcl_HashTable *const namesPtr,
Tcl_HashTable *const examinedClassesPtr);
static inline void AddDefinitionNamespaceToChain(Class *const definerCls,
@@ -247,12 +247,12 @@ StashCallChain(
Tcl_Obj *objPtr,
CallChain *callPtr)
{
- Tcl_ObjIntRep ir;
+ Tcl_ObjInternalRep ir;
callPtr->refCount++;
TclGetString(objPtr);
ir.twoPtrValue.ptr1 = callPtr;
- Tcl_StoreIntRep(objPtr, &methodNameType, &ir);
+ Tcl_StoreInternalRep(objPtr, &methodNameType, &ir);
}
void
@@ -280,7 +280,7 @@ DupMethodNameRep(
Tcl_Obj *dstPtr)
{
StashCallChain(dstPtr,
- (CallChain *)TclFetchIntRep(srcPtr, &methodNameType)->twoPtrValue.ptr1);
+ (CallChain *)TclFetchInternalRep(srcPtr, &methodNameType)->twoPtrValue.ptr1);
}
static void
@@ -288,7 +288,7 @@ FreeMethodNameRep(
Tcl_Obj *objPtr)
{
TclOODeleteChain(
- (CallChain *)TclFetchIntRep(objPtr, &methodNameType)->twoPtrValue.ptr1);
+ (CallChain *)TclFetchInternalRep(objPtr, &methodNameType)->twoPtrValue.ptr1);
}
/*
@@ -369,7 +369,11 @@ TclOOInvokeContext(
* Run the method implementation.
*/
- return mPtr->typePtr->callProc(mPtr->clientData, interp,
+ if (mPtr->typePtr->version < TCL_OO_METHOD_VERSION_2) {
+ return (mPtr->typePtr->callProc)(mPtr->clientData, interp,
+ (Tcl_ObjectContext) contextPtr, objc, objv);
+ }
+ return ((Tcl_MethodCallProc2 *)(void *)(mPtr->typePtr->callProc))(mPtr->clientData, interp,
(Tcl_ObjectContext) contextPtr, objc, objv);
}
@@ -671,7 +675,7 @@ CmpStr(
static void
AddClassMethodNames(
Class *clsPtr, /* Class to get method names from. */
- const int flags, /* Whether we are interested in just the
+ int flags, /* Whether we are interested in just the
* public method names. */
Tcl_HashTable *const namesPtr,
/* Reference to the hash table to put the
@@ -1189,16 +1193,16 @@ TclOOGetCallContext(
* the object, and in the class).
*/
- const Tcl_ObjIntRep *irPtr;
+ const Tcl_ObjInternalRep *irPtr;
const int reuseMask = (WANT_PUBLIC(flags) ? ~0 : ~PUBLIC_METHOD);
- if ((irPtr = TclFetchIntRep(cacheInThisObj, &methodNameType))) {
+ if ((irPtr = TclFetchInternalRep(cacheInThisObj, &methodNameType))) {
callPtr = (CallChain *)irPtr->twoPtrValue.ptr1;
if (IsStillValid(callPtr, oPtr, flags, reuseMask)) {
callPtr->refCount++;
goto returnContext;
}
- Tcl_StoreIntRep(cacheInThisObj, &methodNameType, NULL);
+ Tcl_StoreInternalRep(cacheInThisObj, &methodNameType, NULL);
}
if (oPtr->flags & USE_CLASS_CACHE) {