diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-11-19 21:46:51 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-11-19 21:46:51 (GMT) |
commit | 7f4b300e2a1f846f1aff77518a22caf720b83725 (patch) | |
tree | c662810ad5325082a002448212d340779a39626d /generic/tcl.h | |
parent | 36353f6c04ced7f2f47bd497272b5f291f14e6ad (diff) | |
download | tcl-7f4b300e2a1f846f1aff77518a22caf720b83725.zip tcl-7f4b300e2a1f846f1aff77518a22caf720b83725.tar.gz tcl-7f4b300e2a1f846f1aff77518a22caf720b83725.tar.bz2 |
Single stub library can now handle Tcl8 and Tcl9 with different MAGIC values
Diffstat (limited to 'generic/tcl.h')
-rw-r--r-- | generic/tcl.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index c18b251..b69160d 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -2277,7 +2277,7 @@ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, * stubs tables. */ -#define TCL_STUB_MAGIC ((int) 0xFCA3BACB + sizeof(size_t)) +#define TCL_STUB_MAGIC ((int) (0xFCA3BACB + sizeof(size_t))) /* * The following function is required to be defined in all stubs aware @@ -2286,8 +2286,8 @@ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, * main library in case an extension is statically linked into an application. */ -const char * Tcl_InitStubs(Tcl_Interp *interp, const char *version, - int exact); +const char * TclInitStubs(Tcl_Interp *interp, const char *version, + int exact, int magic); const char * TclTomMathInitializeStubs(Tcl_Interp *interp, const char *version, int epoch, int revision); @@ -2295,16 +2295,15 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp, * When not using stubs, make it a macro. */ -#ifndef USE_TCL_STUBS +#ifdef USE_TCL_STUBS +#define Tcl_InitStubs(interp, version, exact) \ + TclInitStubs(interp, version, exact, TCL_STUB_MAGIC) +#else #define Tcl_InitStubs(interp, version, exact) \ Tcl_PkgInitStubsCheck(interp, version, exact) #endif /* - * TODO - tommath stubs export goes here! - */ - -/* * Public functions that are not accessible via the stubs table. * Tcl_GetMemoryInfo is needed for AOLserver. [Bug 1868171] */ |