TclOO Package

Artifact [ff1939cd0e]
Login

Artifact ff1939cd0e185d29156fa63044ae05f4b91e4368:

Wiki page [Doc: Tcl_OOInitStubs] by dkf 2016-09-17 13:57:11.
D 2016-09-17T13:57:11.841
L Doc:\sTcl_OOInitStubs
N text/x-markdown
P c23d92c9c44f1d148572c81b53e60225cd4ac25f
U dkf
W 1802
<h1>Tcl\_OOInitStubs</h1>
<H3><A NAME="M2">NAME</A></H3>
<b>Tcl\_OOInitStubs</b> &mdash; initialize library access to TclOO functionality
<H3><A NAME="M3">SYNOPSIS</A></H3>
<pre>
<B>#include &lt;tclOO.h&gt;</B><BR>
const char \*<B>Tcl\_OOInitStubs</B>(<I>interp</I>)
</pre>
<H3><A NAME="M4">ARGUMENTS</A></H3>
<DL class="arguments">
<DT>Tcl\_Interp <B>\*interp</B> (in)<DD>
The Tcl interpreter that the TclOO API is integrated with and whose C
interface is going to be used.
<P></DL>
<H3><A NAME="M5">DESCRIPTION</A></H3>
When an extension library is going to use the C interface exposed by TclOO, it
should use <B>Tcl\_OOInitStubs</B> to initialize its access to that interface
from within its <I>\*</I><B>\_Init</B> (or <I>\*</I><B>\_SafeInit</B>) function, passing in
the <I>interp</I> that was passed into that routine as context. If the result
of calling <B>Tcl\_OOInitStubs</B> is NULL, the initialization failed and an
error message will have been left in the interpreter's result. Otherwise, the
initialization succeeded and the TclOO API may thereafter be used; the
version of the TclOO API is returned.
<P>
When using this function, either the C #define symbol <B>USE\_TCLOO\_STUBS</B>
should be defined and your library code linked against the Tcl stub library,
or that #define symbol should <I>not</I> be defined and your library code
linked against the Tcl main library directly.
<H3><A NAME="M6">BACKWARD COMPATIBILITY NOTE</A></H3>
If you are linking against the Tcl 8.5 forward compatibility package for
TclOO, <I>only</I> the stub-enabled configuration is supported and you should
also link against the TclOO independent stub library; that library is an
integrated part of the main Tcl stub library in Tcl 8.6.
<H3><A NAME="M7">KEYWORDS</A></H3>
stubs
Z 0e02332691d3fa0f3d5af4466f65d0a2