diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-16 15:36:55 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-16 15:36:55 (GMT) |
commit | ae0471127efb9e3be2f45c25f91ba07f6a09eae5 (patch) | |
tree | 2c1a79e80eadf01ec2fca71d8eaf062d3af8e470 /generic/tcl.h | |
parent | e019e5bd1d3ddb51539ca9e4872e6c9d310dd390 (diff) | |
parent | 1a6f1d5c40570e83189a91e4301d9e89369ce00e (diff) | |
download | tcl-ae0471127efb9e3be2f45c25f91ba07f6a09eae5.zip tcl-ae0471127efb9e3be2f45c25f91ba07f6a09eae5.tar.gz tcl-ae0471127efb9e3be2f45c25f91ba07f6a09eae5.tar.bz2 |
Prevent extensions compiled with TCL_UTF_MAX=4 (See [https://core.tcl-lang.org/tips/doc/trunk/tip/542.md|TIP #542]) from running in Tcl 8.6.
Diffstat (limited to 'generic/tcl.h')
-rw-r--r-- | generic/tcl.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index f373382..7a8c8a8 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -2417,10 +2417,17 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp, #endif #ifdef USE_TCL_STUBS +# if TCL_UTF_MAX < 4 # define Tcl_InitStubs(interp, version, exact) \ (Tcl_InitStubs)(interp, version, \ (exact)|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16), \ TCL_STUB_MAGIC) +# else +# define Tcl_InitStubs(interp, version, exact) \ + (Tcl_InitStubs)(interp, TCL_PATCH_LEVEL, \ + 1|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16), \ + TCL_STUB_MAGIC) +# endif #else # define Tcl_InitStubs(interp, version, exact) \ Tcl_PkgInitStubsCheck(interp, version, \ |