Clean up Tcl version docs and handling
We require 8.4 now which simplifies things a bit.
This commit is contained in:
parent
8cc3d04a35
commit
64d72483c6
4 changed files with 19 additions and 15 deletions
|
|
@ -3137,9 +3137,8 @@ For example:
|
|||
|
||||
|
||||
<p>
|
||||
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 <tt>-pkgversion</tt> option. For example:
|
||||
SWIG generates all of the code necessary to create a Tcl extension package.
|
||||
To set the package version use the <tt>-pkgversion</tt> option. For example:
|
||||
</p>
|
||||
|
||||
<div class="code">
|
||||
|
|
@ -3150,7 +3149,7 @@ simply use the <tt>-pkgversion</tt> option. For example:
|
|||
|
||||
<p>
|
||||
After building the SWIG generated module, you need to execute
|
||||
the "<tt>pkg_mkIndex</tt>" command inside tclsh. For example :
|
||||
the <tt>pkg_mkIndex</tt> command inside tclsh. For example :
|
||||
</p>
|
||||
|
||||
<div class="code"><pre>
|
||||
|
|
@ -3430,7 +3429,7 @@ interesting things.
|
|||
|
||||
<p>
|
||||
For background information about the Tcl Stubs feature, see
|
||||
<a href="http://www.tcl.tk/doc/howto/stubs.html">http://www.tcl.tk/doc/howto/stubs.html</a>.
|
||||
<a href="https://www.tcl.tk/doc/howto/stubs.html">https://www.tcl.tk/doc/howto/stubs.html</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
@ -3440,11 +3439,17 @@ feature if compiled with <tt>-DUSE_TCL_STUBS</tt>.
|
|||
|
||||
<p>
|
||||
As of SWIG 1.3.40, the generated C/C++ wrapper will use the Tk Stubs
|
||||
feature if compiled with <tt>-DUSE_TK_STUBS</tt>. Also, you can override
|
||||
the minimum version to support which is passed to <tt>Tcl_InitStubs()</tt>
|
||||
and <tt>Tk_InitStubs()</tt> with <tt>-DSWIG_TCL_STUBS_VERSION="8.3"</tt>
|
||||
or the version being compiled with using
|
||||
<tt>-DSWIG_TCL_STUBS_VERSION=TCL_VERSION</tt>.
|
||||
feature if compiled with <tt>-DUSE_TK_STUBS</tt>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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 <tt>Tcl_InitStubs()</tt> and
|
||||
<tt>Tk_InitStubs()</tt>. You can override with a specific version using
|
||||
<tt>-DSWIG_TCL_STUBS_VERSION="8.5"</tt> or set it to the Tcl version being
|
||||
compiled with using <tt>-DSWIG_TCL_STUBS_VERSION=TCL_VERSION</tt>.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue