From 9c9b2cacae6577f7e44679f67806acc56c981bb8 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 26 Aug 2021 15:15:06 +0000 Subject: Add a few spare unused stub entries in TclOO --- generic/tclOO.decls | 3 +++ generic/tclOODecls.h | 11 +++++++++++ generic/tclOOStubInit.c | 5 +++++ generic/tclStubInit.c | 2 +- 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/generic/tclOO.decls b/generic/tclOO.decls index 5d37994..13d6ffa 100644 --- a/generic/tclOO.decls +++ b/generic/tclOO.decls @@ -126,6 +126,9 @@ declare 27 { declare 28 { Tcl_Obj *Tcl_GetObjectName(Tcl_Interp *interp, Tcl_Object object) } +declare 31 { + void TclUnusedStubEntry(void) +} ###################################################################### # Private API, exposed to support advanced OO systems that plug in on top of diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index 9fd62ec..c31828e 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -116,6 +116,10 @@ TCLAPI void Tcl_ClassSetDestructor(Tcl_Interp *interp, /* 28 */ TCLAPI Tcl_Obj * Tcl_GetObjectName(Tcl_Interp *interp, Tcl_Object object); +/* Slot 29 is reserved */ +/* Slot 30 is reserved */ +/* 31 */ +TCLAPI void TclUnusedStubEntry(void); typedef struct { const struct TclOOIntStubs *tclOOIntStubs; @@ -154,6 +158,9 @@ typedef struct TclOOStubs { void (*tcl_ClassSetConstructor) (Tcl_Interp *interp, Tcl_Class clazz, Tcl_Method method); /* 26 */ void (*tcl_ClassSetDestructor) (Tcl_Interp *interp, Tcl_Class clazz, Tcl_Method method); /* 27 */ Tcl_Obj * (*tcl_GetObjectName) (Tcl_Interp *interp, Tcl_Object object); /* 28 */ + void (*reserved29)(void); + void (*reserved30)(void); + void (*tclUnusedStubEntry) (void); /* 31 */ } TclOOStubs; extern const TclOOStubs *tclOOStubsPtr; @@ -226,6 +233,10 @@ extern const TclOOStubs *tclOOStubsPtr; (tclOOStubsPtr->tcl_ClassSetDestructor) /* 27 */ #define Tcl_GetObjectName \ (tclOOStubsPtr->tcl_GetObjectName) /* 28 */ +/* Slot 29 is reserved */ +/* Slot 30 is reserved */ +#define TclUnusedStubEntry \ + (tclOOStubsPtr->tclUnusedStubEntry) /* 31 */ #endif /* defined(USE_TCLOO_STUBS) */ diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c index 900ab22..651b20e 100644 --- a/generic/tclOOStubInit.c +++ b/generic/tclOOStubInit.c @@ -14,6 +14,8 @@ MODULE_SCOPE const TclOOStubs tclOOStubs; #pragma GCC dependency "tclOO.decls" #endif +#define TclUnusedStubEntry 0 + /* !BEGIN!: Do not edit below this line. */ static const TclOOIntStubs tclOOIntStubs = { @@ -73,6 +75,9 @@ const TclOOStubs tclOOStubs = { Tcl_ClassSetConstructor, /* 26 */ Tcl_ClassSetDestructor, /* 27 */ Tcl_GetObjectName, /* 28 */ + 0, /* 29 */ + 0, /* 30 */ + TclUnusedStubEntry, /* 31 */ }; /* !END!: Do not edit above this line. */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 900482b..14440c4 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -58,7 +58,7 @@ #define TclBN_mp_tc_or TclBN_mp_or #define TclBN_mp_tc_xor TclBN_mp_xor #define TclStaticPackage Tcl_StaticPackage -#define TclUnusedStubEntry NULL +#define TclUnusedStubEntry 0 /* See bug 510001: TclSockMinimumBuffers needs plat imp */ #ifdef _WIN64 -- cgit v0.12