TIP #56 Version 1.4: Standardize Call Interface to Tcl_Eval* Functions

This is not necessarily the current version of this TIP.


TIP:56
Title:Standardize Call Interface to Tcl_Eval* Functions
Version:$Revision: 1.4 $
Author:Miguel Sofer <msofer at users dot sourceforge dot net>
State:Final
Type:Project
Tcl-Version:8.4
Vote:Done
Created:Tuesday, 28 August 2001

Abstract

This TIP replaces Tcl_EvalTokens with Tcl_EvalTokensStandard, which obeys the standard result management conventions for script evaluation functions.

Rationale

The standard call interface for Tcl_Eval* functions returns a Tcl completion code (TCL_OK, TCL_ERROR, TCL_RETURN, TCL_BREAK, or TCL_CONTINUE), and sets a result object in the interpreter. The single exception is the function Tcl_EvalTokens, that returns a pointer to the result object, or a NULL when an exception occurs. This effectively transforms all exceptions into errors. This TIP proposes to replace Tcl_EvalTokens with a new function Tcl_EvalTokensStandard that performs the same chores but adheres to the standard call interface.

There are two arguments for the replacement of Tcl_