31. Interpreters

This chapter explains what interpreters are, how to create them and delete them, and how to use them to evaluate Tcl scripts.

31.1 Functions Presented in This Chapter

Tcl_Interp *Tcl_CreateInterp()

Creates and returns a new Tcl interpreter.

Tcl_DeleteInterp(Tcl_Interp *interp)

Deletes a Tcl interpreter.

Tcl_InterpDeleted(Tcl_Interp *interp)

Returns nonzero if the interpreter is slated for deletion.

Tcl_Interp *Tcl_CreateSlave(Tcl_Interp *interp,            CONST charslaveName, int isSafe)

Creates a “slave” interpreter with the name slaveName. The isSafe parameter determines whether to create a safe interpreter or not.

int Tcl_IsSafe(Tcl_Interp *interp)

Returns 1 if the interpreter is safe, otherwise 0.

int Tcl_MakeSafe(Tcl_Interp ...

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.