36. Extensions
Chapter 30 compared the approach of embedding Tcl into an existing application versus extending Tcl with custom commands. It’s usually easier, and faster in terms of programmer time, to code a few extensions in C for an application written in Tcl, rather than write the application in C and call Tcl scripts from it. Writing an extension minimizes the amount of C programming compared to Tcl programming, making for better use of programmer time.
This chapter explains how to write a Tcl extension in C.
36.1 Functions Presented in This Chapter
• CONST char *Tcl_PkgPresent(Tcl_Interp *
interp
,
CONST char *
name
, CONST char *
version
, int
exact
)
CONST char *Tcl_PkgRequire(Tcl_Interp *
interp
,
CONST char *
name ...
Get Tcl and the Tk Toolkit, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.