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>
|
<p>
|
||||||
Tcl 7.4 introduced the idea of an extension package. By default, SWIG
|
SWIG generates all of the code necessary to create a Tcl extension package.
|
||||||
generates all of the code necessary to create a package. To set the package version,
|
To set the package version use the <tt>-pkgversion</tt> option. For example:
|
||||||
simply use the <tt>-pkgversion</tt> option. For example:
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="code">
|
<div class="code">
|
||||||
|
|
@ -3150,7 +3149,7 @@ simply use the <tt>-pkgversion</tt> option. For example:
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
After building the SWIG generated module, you need to execute
|
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>
|
</p>
|
||||||
|
|
||||||
<div class="code"><pre>
|
<div class="code"><pre>
|
||||||
|
|
@ -3430,7 +3429,7 @@ interesting things.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
For background information about the Tcl Stubs feature, see
|
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>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -3440,11 +3439,17 @@ feature if compiled with <tt>-DUSE_TCL_STUBS</tt>.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
As of SWIG 1.3.40, the generated C/C++ wrapper will use the Tk Stubs
|
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
|
feature if compiled with <tt>-DUSE_TK_STUBS</tt>.
|
||||||
the minimum version to support which is passed to <tt>Tcl_InitStubs()</tt>
|
</p>
|
||||||
and <tt>Tk_InitStubs()</tt> with <tt>-DSWIG_TCL_STUBS_VERSION="8.3"</tt>
|
|
||||||
or the version being compiled with using
|
<p>
|
||||||
<tt>-DSWIG_TCL_STUBS_VERSION=TCL_VERSION</tt>.
|
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>
|
</p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ tcl: $(SRCDIR_SRCS)
|
||||||
$(TCLLDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(TCL_SO) $(TCL_LINK)
|
$(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)
|
tcl_cpp: $(SRCDIR_SRCS)
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ LIBS =
|
||||||
# SWIGCC = Compiler used to compile the wrapper file
|
# SWIGCC = Compiler used to compile the wrapper file
|
||||||
|
|
||||||
SWIG = $(exec_prefix)/bin/swig
|
SWIG = $(exec_prefix)/bin/swig
|
||||||
SWIGOPT = -tcl # use -tcl8 for Tcl 8.0
|
SWIGOPT = -tcl
|
||||||
SWIGCC = $(CC)
|
SWIGCC = $(CC)
|
||||||
|
|
||||||
# SWIG Library files. Uncomment if rebuilding tclsh
|
# SWIG Library files. Uncomment if rebuilding tclsh
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ SWIGEXPORT int SWIG_init(Tcl_Interp *);
|
||||||
|
|
||||||
/* Compatibility version for TCL stubs */
|
/* Compatibility version for TCL stubs */
|
||||||
#ifndef SWIG_TCL_STUBS_VERSION
|
#ifndef SWIG_TCL_STUBS_VERSION
|
||||||
#define SWIG_TCL_STUBS_VERSION "8.1"
|
#define SWIG_TCL_STUBS_VERSION "8.4"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
@ -100,8 +100,7 @@ SWIGEXPORT int SWIG_init(Tcl_Interp *interp) {
|
||||||
size_t i;
|
size_t i;
|
||||||
if (interp == 0) return TCL_ERROR;
|
if (interp == 0) return TCL_ERROR;
|
||||||
#ifdef USE_TCL_STUBS
|
#ifdef USE_TCL_STUBS
|
||||||
/* (char*) cast is required to avoid compiler warning/error for Tcl < 8.4. */
|
if (Tcl_InitStubs(interp, SWIG_TCL_STUBS_VERSION, 0) == NULL) {
|
||||||
if (Tcl_InitStubs(interp, (char*)SWIG_TCL_STUBS_VERSION, 0) == NULL) {
|
|
||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue