summaryrefslogtreecommitdiffstats
path: root/generic/tkStyle.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/tkStyle.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/tkStyle.c')
-rw-r--r--generic/tkStyle.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/generic/tkStyle.c b/generic/tkStyle.c
index 2da67ae..16601b1 100644
--- a/generic/tkStyle.c
+++ b/generic/tkStyle.c
@@ -150,12 +150,14 @@ static int SetStyleFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr);
* style object points to the Style structure for the stylefont, or NULL.
*/
-static const Tcl_ObjType styleObjType = {
- "style", /* name */
+static const TkObjType styleObjType = {
+ {"style", /* name */
FreeStyleObjProc, /* freeIntRepProc */
DupStyleObjProc, /* dupIntRepProc */
NULL, /* updateStringProc */
- NULL /* setFromAnyProc */
+ NULL, /* setFromAnyProc */
+ TCL_OBJTYPE_V0},
+ 0
};
/*
@@ -1402,7 +1404,7 @@ Tk_AllocStyleFromObj(
Tcl_Obj *objPtr) /* Object containing name of the style to
* retrieve. */
{
- if (objPtr->typePtr != &styleObjType) {
+ if (objPtr->typePtr != &styleObjType.objType) {
if (SetStyleFromAny(interp, objPtr) != TCL_OK) {
return NULL;
}
@@ -1451,7 +1453,7 @@ SetStyleFromAny(
if (style == NULL) {
return TCL_ERROR;
}
- objPtr->typePtr = &styleObjType;
+ objPtr->typePtr = &styleObjType.objType;
objPtr->internalRep.twoPtrValue.ptr1 = style;
return TCL_OK;