Version 2 of Tcl_InitStubs

Updated 2010-01-06 20:06:35 by dkf
int Tcl_InitStubs(interp, version, exact)

This function is called by an extension (one of the things hooked into Tcl by load) as the first step of initializing the extension. It's just like a Tcl_PkgRequire of the Tcl library itself (you were doing that already, yes?) but also makes available the rest of the Tcl library functions within the extension. You then compile the extension library with -DUSE_TCL_STUBS set and link against libtclstub.a (which probably has a version number too, and might have a different suffix, e.g., .lib on Windows).

The arguments are:

interp
The interpreter that was an argument to your *_Init function.
version
The minimum version of Tcl that you want to support. This should also be the version of the static stub library that you link into your extension during compilation.
exact
Whether you want an exact version of Tcl. You probably don't, so set this to 0.

<<categories> Tcl Library