summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstanton <stanton>1999-02-01 21:29:48 (GMT)
committerstanton <stanton>1999-02-01 21:29:48 (GMT)
commit698e7bfaf6014325ebbdf40634e3d9d9c0c28aca (patch)
tree7091931bbbe9926769ef521c09cb774b668ee6d9
parent3e2cd02657427f0858bc981092e85a6c1feae1a6 (diff)
downloadtcl-698e7bfaf6014325ebbdf40634e3d9d9c0c28aca.zip
tcl-698e7bfaf6014325ebbdf40634e3d9d9c0c28aca.tar.gz
tcl-698e7bfaf6014325ebbdf40634e3d9d9c0c28aca.tar.bz2
* generic/tclBasic.c:
* generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclExecute.c: * generic/tclHistory.c: * generic/tclIO.c: * generic/tclIOUtil.c: * generic/tclInterp.c: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParse.c: * generic/tclProc.c: * generic/tclTest.c: * generic/tclTimer.c: * generic/tcl.h: Made eval interfaces compatible with 8.0 by renaming Tcl_EvalObj to Tcl_EvalObjEx, renaming Tcl_Eval2 to Tcl_EvalEx and restoring Tcl_EvalObj and Tcl_GlobalEvalObj interfaces so they match Tcl 8.0.
-rw-r--r--generic/tcl.h16
-rw-r--r--generic/tclBasic.c12
-rw-r--r--generic/tclCmdAH.c18
-rw-r--r--generic/tclCmdIL.c8
-rw-r--r--generic/tclCmdMZ.c8
-rw-r--r--generic/tclExecute.c4
-rw-r--r--generic/tclHistory.c6
-rw-r--r--generic/tclIO.c6
-rw-r--r--generic/tclIOUtil.c4
-rw-r--r--generic/tclInterp.c6
-rw-r--r--generic/tclMain.c4
-rw-r--r--generic/tclNamesp.c10
-rw-r--r--generic/tclParse.c10
-rw-r--r--generic/tclProc.c8
-rw-r--r--generic/tclTest.c22
-rw-r--r--generic/tclTimer.c4
16 files changed, 77 insertions, 69 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 83e8ba0..4b6864b 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tcl.h,v 1.1.2.10 1999/01/29 00:20:43 stanton Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.1.2.11 1999/02/01 21:29:48 stanton Exp $
*/
#ifndef _TCL
@@ -1259,6 +1259,16 @@ typedef struct Tcl_EncodingType {
typedef unsigned short Tcl_UniChar;
/*
+ * Deprecated Tcl procedures:
+ */
+
+#ifndef TCL_NO_DEPRECATED
+#define Tcl_EvalObj(interp,objPtr) Tcl_EvalObjEx((interp),(objPtr),0)
+#define Tcl_GlobalEvalObj(interp,objPtr) \
+ Tcl_EvalObjEx((interp),(objPtr),TCL_EVAL_GLOBAL)
+#endif
+
+/*
* Exported Tcl procedures:
*/
@@ -1449,13 +1459,13 @@ EXTERN char * Tcl_ErrnoId _ANSI_ARGS_((void));
EXTERN char * Tcl_ErrnoMsg _ANSI_ARGS_((int err));
EXTERN int Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp,
char *string));
-EXTERN int Tcl_Eval2 _ANSI_ARGS_((Tcl_Interp *interp,
+EXTERN int Tcl_EvalEx _ANSI_ARGS_((Tcl_Interp *interp,
char *script, int numBytes, int flags));
EXTERN int Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
char *fileName));
EXTERN int Tcl_EvalObjv _ANSI_ARGS_ ((Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[], int flags));
-EXTERN int Tcl_EvalObj _ANSI_ARGS_((Tcl_Interp *interp,
+EXTERN int Tcl_EvalObjEx _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Obj *objPtr, int flags));
EXTERN void Tcl_EventuallyFree _ANSI_ARGS_((ClientData clientData,
Tcl_FreeProc *freeProc));
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 41525bf..92902da8 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.1.2.6 1998/12/10 21:21:31 stanton Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.1.2.7 1999/02/01 21:29:49 stanton Exp $
*/
#include "tclInt.h"
@@ -2483,7 +2483,7 @@ Tcl_CreateMathFunc(interp, name, numArgs, argTypes, proc, clientData)
/*
*----------------------------------------------------------------------
*
- * Tcl_EvalObj --
+ * Tcl_EvalObjEx --
*
* Execute Tcl commands stored in a Tcl object. These commands are
* compiled into bytecodes if necessary.
@@ -2505,10 +2505,8 @@ Tcl_CreateMathFunc(interp, name, numArgs, argTypes, proc, clientData)
*----------------------------------------------------------------------
*/
-#undef Tcl_EvalObj
-
int
-Tcl_EvalObj(interp, objPtr, flags)
+Tcl_EvalObjEx(interp, objPtr, flags)
Tcl_Interp *interp; /* Token for command interpreter
* (returned by a previous call to
* Tcl_CreateInterp). */
@@ -2541,7 +2539,7 @@ Tcl_EvalObj(interp, objPtr, flags)
if ((iPtr->flags & USE_EVAL_DIRECT) || (flags & TCL_EVAL_DIRECT)) {
/*
* We're not supposed to use the compiler or byte-code interpreter.
- * Let Tcl_Eval2 evaluate the command directly (and probably
+ * Let Tcl_EvalEx evaluate the command directly (and probably
* more slowly).
*/
@@ -2549,7 +2547,7 @@ Tcl_EvalObj(interp, objPtr, flags)
int length;
p = Tcl_GetStringFromObj(objPtr, &length);
- result = Tcl_Eval2(interp, p, length, flags);
+ result = Tcl_EvalEx(interp, p, length, flags);
Tcl_DecrRefCount(objPtr);
return result;
}
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index 0658e5c..982b5d7 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdAH.c,v 1.1.2.7 1998/12/02 21:45:33 stanton Exp $
+ * RCS: @(#) $Id: tclCmdAH.c,v 1.1.2.8 1999/02/01 21:29:49 stanton Exp $
*/
#include "tclInt.h"
@@ -195,7 +195,7 @@ Tcl_CaseObjCmd(dummy, interp, objc, objv)
match:
if (body != -1) {
armPtr = caseObjv[body - 1];
- result = Tcl_EvalObj(interp, caseObjv[body], 0);
+ result = Tcl_EvalObjEx(interp, caseObjv[body], 0);
if (result == TCL_ERROR) {
char msg[100 + TCL_INTEGER_SPACE];
@@ -258,7 +258,7 @@ Tcl_CatchObjCmd(dummy, interp, objc, objv)
varNamePtr = objv[2];
}
- result = Tcl_EvalObj(interp, objv[1], 0);
+ result = Tcl_EvalObjEx(interp, objv[1], 0);
if (objc == 3) {
if (Tcl_SetObjVar2(interp,
@@ -614,7 +614,7 @@ Tcl_EvalObjCmd(dummy, interp, objc, objv)
}
if (objc == 2) {
- result = Tcl_EvalObj(interp, objv[1], 0);
+ result = Tcl_EvalObjEx(interp, objv[1], 0);
} else {
/*
* More than one argument: concatenate them together with spaces
@@ -623,7 +623,7 @@ Tcl_EvalObjCmd(dummy, interp, objc, objv)
objPtr = Tcl_ConcatObj(objc-1, objv+1);
Tcl_IncrRefCount(objPtr);
- result = Tcl_EvalObj(interp, objPtr, 0);
+ result = Tcl_EvalObjEx(interp, objPtr, 0);
Tcl_DecrRefCount(objPtr);
}
if (result == TCL_ERROR) {
@@ -1552,7 +1552,7 @@ Tcl_ForObjCmd(dummy, interp, objc, objv)
return TCL_ERROR;
}
- result = Tcl_EvalObj(interp, objv[1], 0);
+ result = Tcl_EvalObjEx(interp, objv[1], 0);
if (result != TCL_OK) {
if (result == TCL_ERROR) {
Tcl_AddErrorInfo(interp, "\n (\"for\" initial command)");
@@ -1567,7 +1567,7 @@ Tcl_ForObjCmd(dummy, interp, objc, objv)
if (!value) {
break;
}
- result = Tcl_EvalObj(interp, objv[4], 0);
+ result = Tcl_EvalObjEx(interp, objv[4], 0);
if ((result != TCL_OK) && (result != TCL_CONTINUE)) {
if (result == TCL_ERROR) {
char msg[32 + TCL_INTEGER_SPACE];
@@ -1577,7 +1577,7 @@ Tcl_ForObjCmd(dummy, interp, objc, objv)
}
break;
}
- result = Tcl_EvalObj(interp, objv[3], 0);
+ result = Tcl_EvalObjEx(interp, objv[3], 0);
if (result == TCL_BREAK) {
break;
} else if (result != TCL_OK) {
@@ -1785,7 +1785,7 @@ Tcl_ForeachObjCmd(dummy, interp, objc, objv)
}
}
- result = Tcl_EvalObj(interp, bodyPtr, 0);
+ result = Tcl_EvalObjEx(interp, bodyPtr, 0);
if (result != TCL_OK) {
if (result == TCL_CONTINUE) {
result = TCL_OK;
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index b8a7fec..abf261f 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.1.2.5 1998/12/23 02:56:22 rjohnson Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.1.2.6 1999/02/01 21:29:50 stanton Exp $
*/
#include "tclInt.h"
@@ -229,7 +229,7 @@ Tcl_IfObjCmd(dummy, interp, objc, objv)
i++;
if (i >= objc) {
if (thenScriptIndex) {
- return Tcl_EvalObj(interp, objv[thenScriptIndex], 0);
+ return Tcl_EvalObjEx(interp, objv[thenScriptIndex], 0);
}
return TCL_OK;
}
@@ -263,9 +263,9 @@ Tcl_IfObjCmd(dummy, interp, objc, objv)
return TCL_ERROR;
}
if (thenScriptIndex) {
- return Tcl_EvalObj(interp, objv[thenScriptIndex], 0);
+ return Tcl_EvalObjEx(interp, objv[thenScriptIndex], 0);
}
- return Tcl_EvalObj(interp, objv[i], 0);
+ return Tcl_EvalObjEx(interp, objv[i], 0);
}
/*
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index b158c09..47402c6 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdMZ.c,v 1.1.2.8 1998/11/18 22:34:13 stanton Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.1.2.9 1999/02/01 21:29:50 stanton Exp $
*/
#include "tclInt.h"
@@ -1491,7 +1491,7 @@ Tcl_SwitchObjCmd(dummy, interp, objc, objv)
break;
}
}
- result = Tcl_EvalObj(interp, objv[j], 0);
+ result = Tcl_EvalObjEx(interp, objv[j], 0);
if (result == TCL_ERROR) {
char msg[100 + TCL_INTEGER_SPACE];
@@ -1552,7 +1552,7 @@ Tcl_TimeObjCmd(dummy, interp, objc, objv)
i = count;
TclpGetTime(&start);
while (i-- > 0) {
- result = Tcl_EvalObj(interp, objPtr, 0);
+ result = Tcl_EvalObjEx(interp, objPtr, 0);
if (result != TCL_OK) {
return result;
}
@@ -1911,7 +1911,7 @@ Tcl_WhileObjCmd(dummy, interp, objc, objv)
if (!value) {
break;
}
- result = Tcl_EvalObj(interp, objv[2], 0);
+ result = Tcl_EvalObjEx(interp, objv[2], 0);
if ((result != TCL_OK) && (result != TCL_CONTINUE)) {
if (result == TCL_ERROR) {
char msg[32 + TCL_INTEGER_SPACE];
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 8129164..2ee7669 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.1.2.7 1998/12/12 01:36:57 lfb Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.1.2.8 1999/02/01 21:29:51 stanton Exp $
*/
#include "tclInt.h"
@@ -964,7 +964,7 @@ TclExecuteByteCode(interp, codePtr)
case INST_EVAL_STK:
objPtr = POP_OBJECT();
DECACHE_STACK_INFO();
- result = Tcl_EvalObj(interp, objPtr, 0);
+ result = Tcl_EvalObjEx(interp, objPtr, 0);
CACHE_STACK_INFO();
if (result == TCL_OK) {
/*
diff --git a/generic/tclHistory.c b/generic/tclHistory.c
index a0c0822..0c0abfc 100644
--- a/generic/tclHistory.c
+++ b/generic/tclHistory.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclHistory.c,v 1.1.2.2 1998/09/24 23:58:51 stanton Exp $
+ * RCS: @(#) $Id: tclHistory.c,v 1.1.2.3 1999/02/01 21:29:51 stanton Exp $
*/
#include "tclInt.h"
@@ -130,7 +130,7 @@ Tcl_RecordAndEvalObj(interp, cmdPtr, flags)
objPtr = Tcl_NewListObj(3, list);
Tcl_IncrRefCount(objPtr);
- (void) Tcl_EvalObj(interp, objPtr, TCL_EVAL_GLOBAL);
+ (void) Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_GLOBAL);
Tcl_DecrRefCount(objPtr);
/*
@@ -139,7 +139,7 @@ Tcl_RecordAndEvalObj(interp, cmdPtr, flags)
result = TCL_OK;
if (!(flags & TCL_NO_EVAL)) {
- result = Tcl_EvalObj(interp, cmdPtr, flags & TCL_EVAL_GLOBAL);
+ result = Tcl_EvalObjEx(interp, cmdPtr, flags & TCL_EVAL_GLOBAL);
}
return result;
}
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 65c4704..9974fe1 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIO.c,v 1.1.2.5 1998/12/03 04:57:14 stanton Exp $
+ * RCS: @(#) $Id: tclIO.c,v 1.1.2.6 1999/02/01 21:29:52 stanton Exp $
*/
#include "tclInt.h"
@@ -6040,7 +6040,7 @@ ChannelEventScriptInvoker(clientData, mask)
*/
Tcl_Preserve((ClientData) interp);
- result = Tcl_EvalObj(interp, esPtr->scriptPtr, TCL_EVAL_GLOBAL);
+ result = Tcl_EvalObjEx(interp, esPtr->scriptPtr, TCL_EVAL_GLOBAL);
/*
* On error, cause a background error and remove the channel handler
@@ -6978,7 +6978,7 @@ CopyData(csPtr, mask)
if (errObj) {
Tcl_ListObjAppendElement(interp, cmdPtr, errObj);
}
- if (Tcl_EvalObj(interp, cmdPtr, TCL_EVAL_GLOBAL) != TCL_OK) {
+ if (Tcl_EvalObjEx(interp, cmdPtr, TCL_EVAL_GLOBAL) != TCL_OK) {
Tcl_BackgroundError(interp);
result = TCL_ERROR;
}
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 1e80817..8437030 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOUtil.c,v 1.1.2.8 1998/12/12 01:36:58 lfb Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.1.2.9 1999/02/01 21:29:53 stanton Exp $
*/
#include "tclInt.h"
@@ -320,7 +320,7 @@ Tcl_EvalFile(interp, fileName)
oldScriptFile = iPtr->scriptFile;
iPtr->scriptFile = fileName;
string = Tcl_GetStringFromObj(objPtr, &length);
- result = Tcl_Eval2(interp, string, length, 0);
+ result = Tcl_EvalEx(interp, string, length, 0);
iPtr->scriptFile = oldScriptFile;
if (result == TCL_RETURN) {
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 5e663a8..0ea38ff 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInterp.c,v 1.1.2.7 1998/12/12 01:36:59 lfb Exp $
+ * RCS: @(#) $Id: tclInterp.c,v 1.1.2.8 1999/02/01 21:29:53 stanton Exp $
*/
#include <stdio.h>
@@ -2015,11 +2015,11 @@ SlaveEval(interp, slaveInterp, objc, objv)
Tcl_AllowExceptions(slaveInterp);
if (objc == 1) {
- result = Tcl_EvalObj(slaveInterp, objv[0], 0);
+ result = Tcl_EvalObjEx(slaveInterp, objv[0], 0);
} else {
objPtr = Tcl_ConcatObj(objc, objv);
Tcl_IncrRefCount(objPtr);
- result = Tcl_EvalObj(slaveInterp, objPtr, 0);
+ result = Tcl_EvalObjEx(slaveInterp, objPtr, 0);
Tcl_DecrRefCount(objPtr);
}
TclTransferResult(slaveInterp, result, interp);
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 6fd2aad..e8f7f6a 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMain.c,v 1.1.2.2 1998/09/24 23:58:56 stanton Exp $
+ * RCS: @(#) $Id: tclMain.c,v 1.1.2.3 1999/02/01 21:29:54 stanton Exp $
*/
#include "tcl.h"
@@ -193,7 +193,7 @@ Tcl_Main(argc, argv, appInitProc)
Tcl_WriteChars(outChannel, "% ", 2);
}
} else {
- code = Tcl_EvalObj(interp, promptCmdPtr, 0);
+ code = Tcl_EvalObjEx(interp, promptCmdPtr, 0);
inChannel = Tcl_GetStdChannel(TCL_STDIN);
outChannel = Tcl_GetStdChannel(TCL_STDOUT);
errChannel = Tcl_GetStdChannel(TCL_STDERR);
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 261b079..2e8040b 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -19,7 +19,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.1.2.5 1998/12/12 01:37:00 lfb Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.1.2.6 1999/02/01 21:29:54 stanton Exp $
*/
#include "tclInt.h"
@@ -2935,7 +2935,7 @@ NamespaceEvalCmd(dummy, interp, objc, objv)
}
if (objc == 4) {
- result = Tcl_EvalObj(interp, objv[3], 0);
+ result = Tcl_EvalObjEx(interp, objv[3], 0);
} else {
objPtr = Tcl_ConcatObj(objc-3, objv+3);
@@ -2944,7 +2944,7 @@ NamespaceEvalCmd(dummy, interp, objc, objv)
* refcount after eval'ing it.
*/
- result = Tcl_EvalObj(interp, objPtr, TCL_EVAL_DIRECT);
+ result = Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_DIRECT);
}
if (result == TCL_ERROR) {
char msg[256 + TCL_INTEGER_SPACE];
@@ -3290,7 +3290,7 @@ NamespaceInscopeCmd(dummy, interp, objc, objv)
*/
if (objc == 4) {
- result = Tcl_EvalObj(interp, objv[3], 0);
+ result = Tcl_EvalObjEx(interp, objv[3], 0);
} else {
Tcl_Obj *concatObjv[2];
register Tcl_Obj *listPtr, *cmdObjPtr;
@@ -3307,7 +3307,7 @@ NamespaceInscopeCmd(dummy, interp, objc, objv)
concatObjv[0] = objv[3];
concatObjv[1] = listPtr;
cmdObjPtr = Tcl_ConcatObj(2, concatObjv);
- result = Tcl_EvalObj(interp, cmdObjPtr, TCL_EVAL_DIRECT);
+ result = Tcl_EvalObjEx(interp, cmdObjPtr, TCL_EVAL_DIRECT);
Tcl_DecrRefCount(listPtr); /* we're done with the list object */
}
if (result == TCL_ERROR) {
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 60ef783..823e5f9 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclParse.c,v 1.1.2.7 1998/12/02 21:45:42 stanton Exp $
+ * RCS: @(#) $Id: tclParse.c,v 1.1.2.8 1999/02/01 21:29:54 stanton Exp $
*/
#include "tclInt.h"
@@ -1174,7 +1174,7 @@ Tcl_EvalTokens(interp, tokenPtr, count)
break;
case TCL_TOKEN_COMMAND:
- code = Tcl_Eval2(interp, tokenPtr->start+1, tokenPtr->size-2,
+ code = Tcl_EvalEx(interp, tokenPtr->start+1, tokenPtr->size-2,
0);
if (code != TCL_OK) {
goto error;
@@ -1269,7 +1269,7 @@ Tcl_EvalTokens(interp, tokenPtr, count)
/*
*----------------------------------------------------------------------
*
- * Tcl_Eval2 --
+ * Tcl_EvalEx --
*
* This procedure evaluates a Tcl script without using the compiler
* or byte-code interpreter. It just parses the script, creates
@@ -1288,7 +1288,7 @@ Tcl_EvalTokens(interp, tokenPtr, count)
*/
int
-Tcl_Eval2(interp, script, numBytes, flags)
+Tcl_EvalEx(interp, script, numBytes, flags)
Tcl_Interp *interp; /* Interpreter in which to evaluate the
* script. Also used for error reporting. */
char *script; /* First character of script to evaluate. */
@@ -1482,7 +1482,7 @@ Tcl_Eval(interp, string)
{
int code;
- code = Tcl_Eval2(interp, string, -1, 0);
+ code = Tcl_EvalEx(interp, string, -1, 0);
/*
* For backwards compatibility with old C code that predates the
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 93179c6..4a88fde 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclProc.c,v 1.1.2.5 1998/11/11 04:54:19 stanton Exp $
+ * RCS: @(#) $Id: tclProc.c,v 1.1.2.6 1999/02/01 21:29:55 stanton Exp $
*/
#include "tclInt.h"
@@ -604,12 +604,12 @@ Tcl_UplevelObjCmd(dummy, interp, objc, objv)
*/
if (objc == 1) {
- result = Tcl_EvalObj(interp, objv[0], 0);
+ result = Tcl_EvalObjEx(interp, objv[0], 0);
} else {
Tcl_Obj *objPtr;
objPtr = Tcl_ConcatObj(objc, objv);
- result = Tcl_EvalObj(interp, objPtr, TCL_EVAL_DIRECT);
+ result = Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_DIRECT);
}
if (result == TCL_ERROR) {
char msg[32 + TCL_INTEGER_SPACE];
@@ -996,7 +996,7 @@ TclObjInterpProc(clientData, interp, objc, objv)
iPtr->returnCode = TCL_OK;
procPtr->refCount++;
- result = Tcl_EvalObj(interp, procPtr->bodyPtr, 0);
+ result = Tcl_EvalObjEx(interp, procPtr->bodyPtr, 0);
procPtr->refCount--;
if (procPtr->refCount <= 0) {
TclProcCleanupProc(procPtr);
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 2400d0a..c7eba49 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTest.c,v 1.1.2.10 1998/12/10 21:57:48 stanton Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.1.2.11 1999/02/01 21:29:55 stanton Exp $
*/
#define TCL_TEST
@@ -187,7 +187,7 @@ static int TestdstringCmd _ANSI_ARGS_((ClientData dummy,
static int TestencodingObjCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]));
-static int Testeval2ObjCmd _ANSI_ARGS_((ClientData dummy,
+static int TestevalexObjCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]));
static int TestevalobjvObjCmd _ANSI_ARGS_((ClientData dummy,
@@ -358,7 +358,7 @@ Tcltest_Init(interp)
(Tcl_CmdDeleteProc *) NULL);
Tcl_CreateObjCommand(interp, "testencoding", TestencodingObjCmd, (ClientData) 0,
(Tcl_CmdDeleteProc *) NULL);
- Tcl_CreateObjCommand(interp, "testeval2", Testeval2ObjCmd,
+ Tcl_CreateObjCommand(interp, "testevalex", TestevalexObjCmd,
(ClientData) 0, (Tcl_CmdDeleteProc *) NULL);
Tcl_CreateObjCommand(interp, "testevalobjv", TestevalobjvObjCmd,
(ClientData) 0, (Tcl_CmdDeleteProc *) NULL);
@@ -1462,10 +1462,10 @@ EncodingFreeProc(clientData)
/*
*----------------------------------------------------------------------
*
- * Testeval2ObjCmd --
+ * TestevalexObjCmd --
*
- * This procedure implements the "testeval2" command. It is
- * used to test Tcl_Eval2.
+ * This procedure implements the "testevalex" command. It is
+ * used to test Tcl_EvalEx.
*
* Results:
* A standard Tcl result.
@@ -1477,7 +1477,7 @@ EncodingFreeProc(clientData)
*/
static int
-Testeval2ObjCmd(dummy, interp, objc, objv)
+TestevalexObjCmd(dummy, interp, objc, objv)
ClientData dummy; /* Not used. */
Tcl_Interp *interp; /* Current interpreter. */
int objc; /* Number of arguments. */
@@ -1490,7 +1490,7 @@ Testeval2ObjCmd(dummy, interp, objc, objv)
if (objc == 1) {
/*
* The command was invoked with no arguments, so just toggle
- * the flag that determines whether we use Tcl_Eval2.
+ * the flag that determines whether we use Tcl_EvalEx.
*/
if (iPtr->flags & USE_EVAL_DIRECT) {
@@ -1520,14 +1520,14 @@ Testeval2ObjCmd(dummy, interp, objc, objv)
/*
* Note, we have to set the USE_EVAL_DIRECT flag in the interpreter
- * in addition to calling Tcl_Eval2. This is needed so that even nested
+ * in addition to calling Tcl_EvalEx. This is needed so that even nested
* commands are evaluated directly.
*/
oldFlags = iPtr->flags;
iPtr->flags |= USE_EVAL_DIRECT;
string = Tcl_GetStringFromObj(objv[1], &length);
- code = Tcl_Eval2(interp, string, length, flags);
+ code = Tcl_EvalEx(interp, string, length, flags);
iPtr->flags = (iPtr->flags & ~USE_EVAL_DIRECT)
| (oldFlags & USE_EVAL_DIRECT);
return code;
@@ -3828,7 +3828,7 @@ TestsaveresultCmd(dummy, interp, objc, objv)
Tcl_SaveResult(interp, &state);
if (((enum options) index) == RESULT_OBJECT) {
- result = Tcl_EvalObj(interp, objv[2], 0);
+ result = Tcl_EvalObjEx(interp, objv[2], 0);
} else {
result = Tcl_Eval(interp, Tcl_GetString(objv[2]));
}
diff --git a/generic/tclTimer.c b/generic/tclTimer.c
index 1d9d373..eaad21b 100644
--- a/generic/tclTimer.c
+++ b/generic/tclTimer.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTimer.c,v 1.1.2.2 1998/09/24 23:59:04 stanton Exp $
+ * RCS: @(#) $Id: tclTimer.c,v 1.1.2.3 1999/02/01 21:29:56 stanton Exp $
*/
#include "tclInt.h"
@@ -1032,7 +1032,7 @@ AfterProc(clientData)
interp = assocPtr->interp;
Tcl_Preserve((ClientData) interp);
script = Tcl_GetStringFromObj(afterPtr->commandPtr, &numBytes);
- result = Tcl_Eval2(interp, script, numBytes, TCL_EVAL_GLOBAL);
+ result = Tcl_EvalEx(interp, script, numBytes, TCL_EVAL_GLOBAL);
if (result != TCL_OK) {
Tcl_AddErrorInfo(interp, "\n (\"after\" script)");
Tcl_BackgroundError(interp);