Debian Codegraph @

doc/OOInitStubs.3

raw
1 '\"
2 '\" Copyright (c) 2012 Donal K. Fellows
3 '\"
4 '\" See the file "license.terms" for information on usage and redistribution
5 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6 '\"
7 .TH Tcl_OOInitStubs 3 1.0 TclOO "TclOO Library Functions"
8 .so man.macros
9 .BS
10 '\" Note: do not modify the .SH NAME line immediately below!
11 .SH NAME
12 Tcl_OOInitStubs \- initialize library access to TclOO functionality
13 .SH SYNOPSIS
14 .nf
15 \fB#include <tclOO.h>\fR
16 .sp
17 const char *
18 \fBTcl_OOInitStubs\fR(\fIinterp\fR)
19 .fi
20 .SH ARGUMENTS
21 .AS Tcl_Interp *interp in
22 .AP Tcl_Interp *interp in
23 The Tcl interpreter that the TclOO API is integrated with and whose C
24 interface is going to be used.
25 .BE
26 .SH DESCRIPTION
27 .PP
28 When an extension library is going to use the C interface exposed by TclOO, it
29 should use \fBTcl_OOInitStubs\fR to initialize its access to that interface
30 from within its \fI*\fB_Init\fR (or \fI*\fB_SafeInit\fR) function, passing in
31 the \fIinterp\fR that was passed into that routine as context. If the result
32 of calling \fBTcl_OOInitStubs\fR is NULL, the initialization failed and an
33 error message will have been left in the interpreter's result. Otherwise, the
34 initialization succeeded and the TclOO API may thereafter be used; the
35 version of the TclOO API is returned.
36 .PP
37 When using this function, either the C #define symbol \fBUSE_TCLOO_STUBS\fR
38 should be defined and your library code linked against the Tcl stub library,
39 or that #define symbol should \fInot\fR be defined and your library code
40 linked against the Tcl main library directly.
41 .SH "BACKWARD COMPATIBILITY NOTE"
42 .PP
43 If you are linking against the Tcl 8.5 forward compatibility package for
44 TclOO, \fIonly\fR the stub-enabled configuration is supported and you should
45 also link against the TclOO independent stub library; that library is an
46 integrated part of the main Tcl stub library in Tcl 8.6.
47 .SH KEYWORDS
48 stubs
49 .SH "SEE ALSO"
50 Tcl_InitStubs(3)
51 .\" Local variables:
52 .\" mode: nroff
53 .\" fill-column: 78
54 .\" End: