TclOO Package

Changes To Doc: Tcl_OOInitStubs
Login

Initial version of "Doc: Tcl_OOInitStubs"




































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<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