Tcl\_OOInitStubs(3) TclOO Library Functions Tcl\_OOInitStubs(3)

```

```

# [NAME](#NAME)

Tcl\_OOInitStubs - initialize library access to TclOO functionality

# [SYNOPSIS](#SYNOPSIS)

```
#include <tclOO.h>

const char *
Tcl_OOInitStubs(interp)
```

# [ARGUMENTS](#ARGUMENTS)

Tcl\_Interp *\*interp* (in)

The Tcl interpreter that the TclOO API is integrated with and whose C interface is going to be used.

```
    
```

# [DESCRIPTION](#DESCRIPTION)

When an extension library is going to use the C interface exposed by TclOO, it should use **Tcl\_OOInitStubs** to initialize its access to that interface from within its *\*\_Init* (or *\*\_SafeInit*) function, passing in the *interp* that was passed into that routine as context. If the result of calling **Tcl\_OOInitStubs** 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.

When using this function, either the C #define symbol **USE\_TCLOO\_STUBS** should be defined and your library code linked against the Tcl stub library, or that #define symbol should *not* be defined and your library code linked against the Tcl main library directly.

# [BACKWARD COMPATIBILITY NOTE](#BACKWARD_COMPATIBILITY_NOTE)

If you are linking against the Tcl 8.5 forward compatibility package for TclOO, *only* 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.

# [KEYWORDS](#KEYWORDS)

stubs

# [SEE ALSO](#SEE_ALSO)

[Tcl\_InitStubs(3)](/man/os/tcl/Tcl_InitStubs.3)

1.0 TclOO

---

Document: Tcl_OOInitStubs(3) from tcl 9.1.0-r2 (Chainguard OS)
Source: https://downloads.sourceforge.net/project/tcl/Tcl/9.1.0/tcl9.1.0-src.tar.gz
