diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-09-07 12:48:06 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-09-07 12:48:06 (GMT) |
| commit | a03f6be6938582565178e02aa1036f75bd164a22 (patch) | |
| tree | 834be06e727add74f7f5ea38df5fc41c9a3a15bc /generic/tclStubLib.c | |
| parent | 82a85e5b1eb378f5a45526e1b098459f6b848f42 (diff) | |
| parent | 67be0a6752a150bad176f36988e3af03f25cc4d3 (diff) | |
| download | tcl-a03f6be6938582565178e02aa1036f75bd164a22.zip tcl-a03f6be6938582565178e02aa1036f75bd164a22.tar.gz tcl-a03f6be6938582565178e02aa1036f75bd164a22.tar.bz2 | |
Merge 8.7
Diffstat (limited to 'generic/tclStubLib.c')
| -rw-r--r-- | generic/tclStubLib.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 46d2f90..f06b2d1 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -17,11 +17,13 @@ MODULE_SCOPE const TclStubs *tclStubsPtr; MODULE_SCOPE const TclPlatStubs *tclPlatStubsPtr; MODULE_SCOPE const TclIntStubs *tclIntStubsPtr; MODULE_SCOPE const TclIntPlatStubs *tclIntPlatStubsPtr; +MODULE_SCOPE void *tclStubsHandle; const TclStubs *tclStubsPtr = NULL; const TclPlatStubs *tclPlatStubsPtr = NULL; const TclIntStubs *tclIntStubsPtr = NULL; const TclIntPlatStubs *tclIntPlatStubsPtr = NULL; +void *tclStubsHandle = NULL; /* * Use our own ISDIGIT to avoid linking to libc on windows @@ -56,10 +58,12 @@ Tcl_InitStubs( { Interp *iPtr = (Interp *)interp; const char *actualVersion = NULL; - ClientData pkgData = NULL; + void *pkgData = NULL; const TclStubs *stubsPtr = iPtr->stubTable; const char *tclName = (((exact&0xFF00) >= 0x900) ? "tcl" : "Tcl"); +#undef TCL_STUB_MAGIC /* We need the TCL_STUB_MAGIC from Tcl 8.x here */ +#define TCL_STUB_MAGIC ((int) 0xFCA3BACF) /* * We can't optimize this check by caching tclStubsPtr because that * prevents apps from being able to load/unload Tcl dynamically multiple @@ -106,6 +110,9 @@ Tcl_InitStubs( /* We are running Tcl 8.x */ stubsPtr = (TclStubs *)pkgData; } + if (tclStubsHandle == NULL) { + tclStubsHandle = INT2PTR(-1); + } tclStubsPtr = stubsPtr; if (stubsPtr->hooks) { |
