diff --git a/Doc/Manual/Tcl.html b/Doc/Manual/Tcl.html index c271a2ee6..ab3346c70 100644 --- a/Doc/Manual/Tcl.html +++ b/Doc/Manual/Tcl.html @@ -3137,9 +3137,8 @@ For example:

-Tcl 7.4 introduced the idea of an extension package. By default, SWIG -generates all of the code necessary to create a package. To set the package version, -simply use the -pkgversion option. For example: +SWIG generates all of the code necessary to create a Tcl extension package. +To set the package version use the -pkgversion option. For example:

@@ -3150,7 +3149,7 @@ simply use the -pkgversion option. For example:

After building the SWIG generated module, you need to execute -the "pkg_mkIndex" command inside tclsh. For example : +the pkg_mkIndex command inside tclsh. For example :

@@ -3430,7 +3429,7 @@ interesting things.
 
 

For background information about the Tcl Stubs feature, see -http://www.tcl.tk/doc/howto/stubs.html. +https://www.tcl.tk/doc/howto/stubs.html.

@@ -3440,11 +3439,17 @@ feature if compiled with -DUSE_TCL_STUBS.

As of SWIG 1.3.40, the generated C/C++ wrapper will use the Tk Stubs -feature if compiled with -DUSE_TK_STUBS. Also, you can override -the minimum version to support which is passed to Tcl_InitStubs() -and Tk_InitStubs() with -DSWIG_TCL_STUBS_VERSION="8.3" -or the version being compiled with using --DSWIG_TCL_STUBS_VERSION=TCL_VERSION. +feature if compiled with -DUSE_TK_STUBS. +

+ +

+By default SWIG sets the minimum Tcl version to support to the 8.4 +as that's the minimum Tcl version we aim to support (since SWIG 4.1.0; before +this SWIG set it to 8.1, which was the first Tcl version with the stubs +mechanism). This minimum version is passed to Tcl_InitStubs() and +Tk_InitStubs(). You can override with a specific version using +-DSWIG_TCL_STUBS_VERSION="8.5" or set it to the Tcl version being +compiled with using -DSWIG_TCL_STUBS_VERSION=TCL_VERSION.

diff --git a/Examples/Makefile.in b/Examples/Makefile.in index 532152e80..03b33430c 100644 --- a/Examples/Makefile.in +++ b/Examples/Makefile.in @@ -191,7 +191,7 @@ tcl: $(SRCDIR_SRCS) $(TCLLDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(TCL_SO) $(TCL_LINK) # ----------------------------------------------------------- -# Build a Tcl7.5 dynamic loadable module for C++ +# Build a Tcl dynamic loadable module for C++ # ----------------------------------------------------------- tcl_cpp: $(SRCDIR_SRCS) diff --git a/Lib/tcl/Makefile.in b/Lib/tcl/Makefile.in index 13d7d4653..019091c98 100644 --- a/Lib/tcl/Makefile.in +++ b/Lib/tcl/Makefile.in @@ -45,7 +45,7 @@ LIBS = # SWIGCC = Compiler used to compile the wrapper file SWIG = $(exec_prefix)/bin/swig -SWIGOPT = -tcl # use -tcl8 for Tcl 8.0 +SWIGOPT = -tcl SWIGCC = $(CC) # SWIG Library files. Uncomment if rebuilding tclsh diff --git a/Lib/tcl/tclinit.swg b/Lib/tcl/tclinit.swg index 3140bdcdb..cf14de881 100644 --- a/Lib/tcl/tclinit.swg +++ b/Lib/tcl/tclinit.swg @@ -24,7 +24,7 @@ SWIGEXPORT int SWIG_init(Tcl_Interp *); /* Compatibility version for TCL stubs */ #ifndef SWIG_TCL_STUBS_VERSION -#define SWIG_TCL_STUBS_VERSION "8.1" +#define SWIG_TCL_STUBS_VERSION "8.4" #endif %} @@ -100,8 +100,7 @@ SWIGEXPORT int SWIG_init(Tcl_Interp *interp) { size_t i; if (interp == 0) return TCL_ERROR; #ifdef USE_TCL_STUBS - /* (char*) cast is required to avoid compiler warning/error for Tcl < 8.4. */ - if (Tcl_InitStubs(interp, (char*)SWIG_TCL_STUBS_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, SWIG_TCL_STUBS_VERSION, 0) == NULL) { return TCL_ERROR; } #endif