From 1ba24536456192e2d32ba0a36d4d2e67cfd74050 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 11 Apr 2024 13:55:02 +0000 Subject: No need for TCL_OBJTYPE_V0 in Tcl 8.7. Make StrIdxTreeObjType static const. Define TCL_OBJTYPE_V1/TCL_OBJTYPE_V2 for 8.7 --- generic/tcl.h | 2 ++ generic/tclClockFmt.c | 3 +-- generic/tclStrIdxTree.c | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/generic/tcl.h b/generic/tcl.h index ca8901d..de74afb 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -783,6 +783,8 @@ typedef struct Tcl_ObjType { * old type. Returns TCL_ERROR on failure. */ } Tcl_ObjType; #define TCL_OBJTYPE_V0 /* just empty */ +#define TCL_OBJTYPE_V1(a) /* just empty */ +#define TCL_OBJTYPE_V2(a,b,c,d,e,f,g,h) /* just empty */ /* * The following structure stores an internal representation (internalrep) for diff --git a/generic/tclClockFmt.c b/generic/tclClockFmt.c index b9ce546..b5d507c 100644 --- a/generic/tclClockFmt.c +++ b/generic/tclClockFmt.c @@ -592,8 +592,7 @@ static const Tcl_ObjType ClockFmtObjType = { ClockFmtObj_FreeInternalRep, /* freeIntRepProc */ ClockFmtObj_DupInternalRep, /* dupIntRepProc */ ClockFmtObj_UpdateString, /* updateStringProc */ - ClockFmtObj_SetFromAny, /* setFromAnyProc */ - TCL_OBJTYPE_V0 + ClockFmtObj_SetFromAny /* setFromAnyProc */ }; #define ObjClockFmtScn(objPtr) \ diff --git a/generic/tclStrIdxTree.c b/generic/tclStrIdxTree.c index b6e0672..a1c83a9 100644 --- a/generic/tclStrIdxTree.c +++ b/generic/tclStrIdxTree.c @@ -60,13 +60,12 @@ static void StrIdxTreeObj_DupIntRepProc(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr); static void StrIdxTreeObj_FreeIntRepProc(Tcl_Obj *objPtr); static void StrIdxTreeObj_UpdateStringProc(Tcl_Obj *objPtr); -Tcl_ObjType StrIdxTreeObjType = { +static const Tcl_ObjType StrIdxTreeObjType = { "str-idx-tree", /* name */ StrIdxTreeObj_FreeIntRepProc, /* freeIntRepProc */ StrIdxTreeObj_DupIntRepProc, /* dupIntRepProc */ StrIdxTreeObj_UpdateStringProc, /* updateStringProc */ - NULL, /* setFromAnyProc */ - TCL_OBJTYPE_V0 + NULL /* setFromAnyProc */ }; /* -- cgit v0.12