summaryrefslogtreecommitdiffstats
path: root/generic/tkConfig.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-15 16:56:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-15 16:56:16 (GMT)
commit17d96098949972e2aa7fb0ac1978830d2a6e69b0 (patch)
tree4000733fec548613212c62c1e35a3e7a979207df /generic/tkConfig.c
parentd80101981013503e4c99a9e4a7f769951412ad72 (diff)
downloadtk-17d96098949972e2aa7fb0ac1978830d2a6e69b0.zip
tk-17d96098949972e2aa7fb0ac1978830d2a6e69b0.tar.gz
tk-17d96098949972e2aa7fb0ac1978830d2a6e69b0.tar.bz2
Make Tk compile/run either with or without TIP #644: Make Tcl_ObjType extensible
Diffstat (limited to 'generic/tkConfig.c')
-rw-r--r--generic/tkConfig.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/generic/tkConfig.c b/generic/tkConfig.c
index 34b3960..78a23cc 100644
--- a/generic/tkConfig.c
+++ b/generic/tkConfig.c
@@ -147,12 +147,14 @@ static void DupOptionInternalRep(Tcl_Obj *, Tcl_Obj *);
* the internalPtr2 field points to the entry that matched.
*/
-static const Tcl_ObjType optionObjType = {
- "option", /* name */
+static const TkObjType optionObjType = {
+ {"option", /* name */
FreeOptionInternalRep, /* freeIntRepProc */
DupOptionInternalRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- NULL /* setFromAnyProc */
+ NULL, /* setFromAnyProc */
+ TCL_OBJTYPE_V0},
+ 0
};
/*
@@ -1158,7 +1160,7 @@ GetOptionFromObj(
* First, check to see if the object already has the answer cached.
*/
- if (objPtr->typePtr == &optionObjType) {
+ if (objPtr->typePtr == &optionObjType.objType) {
if (objPtr->internalRep.twoPtrValue.ptr1 == (void *) tablePtr) {
return (Option *) objPtr->internalRep.twoPtrValue.ptr2;
}
@@ -1180,7 +1182,7 @@ GetOptionFromObj(
}
objPtr->internalRep.twoPtrValue.ptr1 = (void *) tablePtr;
objPtr->internalRep.twoPtrValue.ptr2 = (void *) bestPtr;
- objPtr->typePtr = &optionObjType;
+ objPtr->typePtr = &optionObjType.objType;
tablePtr->refCount++;
return bestPtr;