Subject: Convert Tcl_Eval and Tcl_GlobalEval to a macro

From: "jan.nijtmans" <[email-masked]>
Date: Thu, 17 Jan 2013 22:28:38 +0000

---
 generic/tcl.decls            | 15 +++++++-----
 generic/tcl.h                |  8 -------
 generic/tclBasic.c           | 56 --------------------------------------------
 generic/tclDecls.h           | 31 ++++++++++++------------
 generic/tclInt.decls         |  2 +-
 generic/tclIntDecls.h        | 45 -----------------------------------
 generic/tclInterp.c          | 10 ++++----
 generic/tclOO.c              |  4 ++--
 generic/tclStubInit.c        |  4 ++--
 generic/tclTest.c            | 18 +++++++-------
 generic/tclTestProcBodyObj.c |  2 +-
 generic/tclThreadTest.c      |  2 +-
 generic/tclTrace.c           |  4 ++--
 generic/tclZlib.c            |  4 ++--
 unix/Makefile.in             |  4 ++--
 unix/dltest/pkge.c           |  2 +-
 win/Makefile.in              |  4 ++--
 17 files changed, 54 insertions(+), 161 deletions(-)

diff --git a/generic/tcl.decls b/generic/tcl.decls
index 6f46e61..2f1d4ac 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -467,16 +467,18 @@ declare 127 {
 declare 128 {
     const char *Tcl_ErrnoMsg(int err)
 }
-declare 129 {
-    int Tcl_Eval(Tcl_Interp *interp, const char *script)
-}
+# Removed in 9.0:
+#declare 129 {
+#    int Tcl_Eval(Tcl_Interp *interp, const char *script)
+#}
 # Removed in 9.0:
 #declare 130 {
 #    int Tcl_EvalFile(Tcl_Interp *interp, const char *fileName)
 #}
-declare 131 {
-    int Tcl_EvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr)
-}
+# Removed in 9.0:
+#declare 131 {
+#    int Tcl_EvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr)
+#}
 declare 132 {
     void Tcl_EventuallyFree(ClientData clientData, Tcl_FreeProc *freeProc)
 }
@@ -639,6 +641,7 @@ declare 176 {
 #declare 177 {
 #    int Tcl_GlobalEval(Tcl_Interp *interp, const char *command)
 #}
+# Removed in 9.0
 #declare 178 {
 #    int Tcl_GlobalEvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr)
 #}
diff --git a/generic/tcl.h b/generic/tcl.h
index c2ea113..5ae5f5d 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -2411,14 +2411,6 @@ TCLAPI void		Tcl_GetMemoryInfo(Tcl_DString *dsPtr);
 #define Tcl_ConditionFinalize(condPtr)
 #endif /* TCL_THREADS */
 
-/*
- *----------------------------------------------------------------------------
- * Deprecated Tcl functions:
- */
-
-#ifndef TCL_NO_DEPRECATED
-#endif /* !TCL_NO_DEPRECATED */
-
 #endif /* RC_INVOKED */
 
 /*
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index c15d3c1..3427dff 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -5341,62 +5341,6 @@ TclArgumentGet(
 /*
  *----------------------------------------------------------------------
  *
- * Tcl_Eval --
- *
- *	Execute a Tcl command in a string. This function executes the script
- *	directly, rather than compiling it to bytecodes. Before the arrival of
- *	the bytecode compiler in Tcl 8.0 Tcl_Eval was the main function used
- *	for executing Tcl commands, but nowadays it isn't used much.
- *
- * Results:
- *	The return value is one of the return codes defined in tcl.h (such as
- *	TCL_OK), and interp's result contains a value to supplement the return
- *	code. The value of the result will persist only until the next call to
- *	Tcl_Eval or Tcl_EvalObj: you must copy it or lose it!
- *
- * Side effects:
- *	Can be almost arbitrary, depending on the commands in the script.
- *
- *----------------------------------------------------------------------
- */
-
-int
-Tcl_Eval(
-    Tcl_Interp *interp,		/* Token for command interpreter (returned by
-				 * previous call to Tcl_CreateInterp). */
-    const char *script)		/* Pointer to TCL command to execute. */
-{
-    return Tcl_EvalEx(interp, script, -1, 0);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * Tcl_EvalObj --
- *
- *	These functions are deprecated but we keep them around for backwards
- *	compatibility reasons.
- *
- * Results:
- *	See the functions they call.
- *
- * Side effects:
- *	See the functions they call.
- *
- *----------------------------------------------------------------------
- */
-
-int
-Tcl_EvalObj(
-    Tcl_Interp *interp,
-    Tcl_Obj *objPtr)
-{
-    return Tcl_EvalObjEx(interp, objPtr, 0);
-}
-
-/*
- *----------------------------------------------------------------------
- *
  * Tcl_EvalObjEx, TclEvalObjEx --
  *
  *	Execute Tcl commands stored in a Tcl object. These commands are
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index f28069b..b824e76 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -385,11 +385,9 @@ TCLAPI int		Tcl_Eof(Tcl_Channel chan);
 TCLAPI const char *	Tcl_ErrnoId(void);
 /* 128 */
 TCLAPI const char *	Tcl_ErrnoMsg(int err);
-/* 129 */
-TCLAPI int		Tcl_Eval(Tcl_Interp *interp, const char *script);
+/* Slot 129 is reserved */
 /* Slot 130 is reserved */
-/* 131 */
-TCLAPI int		Tcl_EvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr);
+/* Slot 131 is reserved */
 /* 132 */
 TCLAPI void		Tcl_EventuallyFree(ClientData clientData,
 				Tcl_FreeProc *freeProc);
@@ -1918,9 +1916,9 @@ typedef struct TclStubs {
     int (*tcl_Eof) (Tcl_Channel chan); /* 126 */
     const char * (*tcl_ErrnoId) (void); /* 127 */
     const char * (*tcl_ErrnoMsg) (int err); /* 128 */
-    int (*tcl_Eval) (Tcl_Interp *interp, const char *script); /* 129 */
+    void (*reserved129)(void);
     void (*reserved130)(void);
-    int (*tcl_EvalObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 131 */
+    void (*reserved131)(void);
     void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc *freeProc); /* 132 */
     void (*tcl_Exit) (int status); /* 133 */
     int (*tcl_ExposeCommand) (Tcl_Interp *interp, const char *hiddenCmdToken, const char *cmdName); /* 134 */
@@ -2712,11 +2710,9 @@ extern const TclStubs *tclStubsPtr;
 	(tclStubsPtr->tcl_ErrnoId) /* 127 */
 #define Tcl_ErrnoMsg \
 	(tclStubsPtr->tcl_ErrnoMsg) /* 128 */
-#define Tcl_Eval \
-	(tclStubsPtr->tcl_Eval) /* 129 */
+/* Slot 129 is reserved */
 /* Slot 130 is reserved */
-#define Tcl_EvalObj \
-	(tclStubsPtr->tcl_EvalObj) /* 131 */
+/* Slot 131 is reserved */
 #define Tcl_EventuallyFree \
 	(tclStubsPtr->tcl_EventuallyFree) /* 132 */
 #define Tcl_Exit \
@@ -3740,17 +3736,20 @@ TCLAPI void Tcl_MainExW(int argc, wchar_t **argv,
 	Tcl_PkgProvideEx(interp, name, version, NULL)
 #define Tcl_PkgRequire(interp, name, version, exact) \
 	Tcl_PkgRequireEx(interp, name, version, exact, NULL)
+#define Tcl_Eval(interp,objPtr) \
+	Tcl_EvalEx((interp),(objPtr),-1,0)
+#define Tcl_GlobalEval(interp,objPtr) \
+	Tcl_EvalEx((interp),(objPtr),-1,TCL_EVAL_GLOBAL)
 
 /*
  * Deprecated Tcl procedures:
  */
-#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
-#   undef Tcl_EvalObj
+
+#ifndef TCL_NO_DEPRECATED
 #   define Tcl_EvalObj(interp,objPtr) \
-	Tcl_EvalObjEx((interp),(objPtr),0)
-#   undef Tcl_GlobalEvalObj
+	    Tcl_EvalObjEx((interp),(objPtr),0)
 #   define Tcl_GlobalEvalObj(interp,objPtr) \
-	Tcl_EvalObjEx((interp),(objPtr),TCL_EVAL_GLOBAL)
-#endif
+	    Tcl_EvalObjEx((interp),(objPtr),TCL_EVAL_GLOBAL)
+#endif /* !TCL_NO_DEPRECATED */
 
 #endif /* _TCLDECLS */
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 5f97a60..b840d04 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -746,7 +746,7 @@ declare 177 {
     void TclVarErrMsg(Tcl_Interp *interp, const char *part1, const char *part2,
 	    const char *operation, const char *reason)
 }
-# TIP 338 made these public - now declared in tcl.h too
+# TIP 338 made these public - now declared in tcl.h
 #declare 178 {
 #    void Tcl_SetStartupScript(Tcl_Obj *pathPtr, const char *encodingName)
 #}
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 2c6ab11..26b168f 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -1209,49 +1209,4 @@ extern const TclIntStubs *tclIntStubsPtr;
 
 /* !END!: Do not edit above this line. */
 
-#if defined(USE_TCL_STUBS) && defined(TCL_NO_DEPRECATED)
-#   undef Tcl_SetStartupScript
-#   define Tcl_SetStartupScript \
-	    (tclStubsPtr->tcl_SetStartupScript) /* 622 */
-#   undef Tcl_GetStartupScript
-#   define Tcl_GetStartupScript \
-	    (tclStubsPtr->tcl_GetStartupScript) /* 623 */
-#   undef Tcl_CreateNamespace
-#   define Tcl_CreateNamespace \
-	   (tclStubsPtr->tcl_CreateNamespace) /* 506 */
-#   undef Tcl_DeleteNamespace
-#   define Tcl_DeleteNamespace \
-	   (tclStubsPtr->tcl_DeleteNamespace) /* 507 */
-#   undef Tcl_AppendExportList
-#   define Tcl_AppendExportList \
-	   (tclStubsPtr->tcl_AppendExportList) /* 508 */
-#   undef Tcl_Export
-#   define Tcl_Export \
-	   (tclStubsPtr->tcl_Export) /* 509 */
-#   undef Tcl_Import
-#   define Tcl_Import \
-	   (tclStubsPtr->tcl_Import) /* 510 */
-#   undef Tcl_ForgetImport
-#   define Tcl_ForgetImport \
-	   (tclStubsPtr->tcl_ForgetImport) /* 511 */
-#   undef Tcl_GetCurrentNamespace
-#   define Tcl_GetCurrentNamespace \
-	   (tclStubsPtr->tcl_GetCurrentNamespace) /* 512 */
-#   undef Tcl_GetGlobalNamespace
-#   define Tcl_GetGlobalNamespace \
-	   (tclStubsPtr->tcl_GetGlobalNamespace) /* 513 */
-#   undef Tcl_FindNamespace
-#   define Tcl_FindNamespace \
-	   (tclStubsPtr->tcl_FindNamespace) /* 514 */
-#   undef Tcl_FindCommand
-#   define Tcl_FindCommand \
-	   (tclStubsPtr->tcl_FindCommand) /* 515 */
-#   undef Tcl_GetCommandFromObj
-#   define Tcl_GetCommandFromObj \
-	   (tclStubsPtr->tcl_GetCommandFromObj) /* 516 */
-#   undef Tcl_GetCommandFullName
-#   define Tcl_GetCommandFullName \
-	   (tclStubsPtr->tcl_GetCommandFullName) /* 517 */
-#endif
-
 #endif /* _TCLINTDECLS */
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 2b93ab0..8b7a5a4 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -299,7 +299,7 @@ Tcl_Init(
     Tcl_Interp *interp)		/* Interpreter to initialize. */
 {
     if (tclPreInitScript != NULL) {
-	if (Tcl_Eval(interp, tclPreInitScript) == TCL_ERROR) {
+	if (Tcl_EvalEx(interp, tclPreInitScript, -1, 0) == TCL_ERROR) {
 	    return TCL_ERROR;
 	}
     }
@@ -345,7 +345,7 @@ Tcl_Init(
      * alternate tclInit command before calling Tcl_Init().
      */
 
-    return Tcl_Eval(interp,
+    return Tcl_EvalEx(interp,
 "if {[namespace which -command tclInit] eq \"\"} {\n"
 "  proc tclInit {} {\n"
 "    global tcl_libPath tcl_library env tclDefaultLibrary\n"
@@ -407,7 +407,7 @@ Tcl_Init(
 "    error $msg\n"
 "  }\n"
 "}\n"
-"tclInit");
+"tclInit", -1, 0);
 }
 
 /*
@@ -3141,8 +3141,8 @@ Tcl_MakeSafe(
 	 * Assume these functions all work. [Bug 2895741]
 	 */
 
-	(void) Tcl_Eval(interp,
-		"namespace eval ::tcl {namespace eval mathfunc {}}");
+	(void) Tcl_EvalEx(interp,
+		"namespace eval ::tcl {namespace eval mathfunc {}}", -1, 0);
 	(void) Tcl_CreateAlias(interp, "::tcl::mathfunc::min", master,
 		"::tcl::mathfunc::min", 0, NULL);
 	(void) Tcl_CreateAlias(interp, "::tcl::mathfunc::max", master,
diff --git a/generic/tclOO.c b/generic/tclOO.c
index d6d2d6a..f5e1f20 100644
--- a/generic/tclOO.c
+++ b/generic/tclOO.c
@@ -267,7 +267,7 @@ TclOOInit(
      * to be fully provided.
      */
 
-    if (Tcl_Eval(interp, initScript) != TCL_OK) {
+    if (Tcl_EvalEx(interp, initScript, -1, 0) != TCL_OK) {
 	return TCL_ERROR;
     }
 
@@ -458,7 +458,7 @@ InitFoundation(
     if (TclOODefineSlots(fPtr) != TCL_OK) {
 	return TCL_ERROR;
     }
-    return Tcl_Eval(interp, slotScript);
+    return Tcl_EvalEx(interp, slotScript, -1, 0);
 }
 
 /*
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 3dd0b48..eb9cd95 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -783,9 +783,9 @@ const TclStubs tclStubs = {
     Tcl_Eof, /* 126 */
     Tcl_ErrnoId, /* 127 */
     Tcl_ErrnoMsg, /* 128 */
-    Tcl_Eval, /* 129 */
+    0, /* 129 */
     0, /* 130 */
-    Tcl_EvalObj, /* 131 */
+    0, /* 131 */
     Tcl_EventuallyFree, /* 132 */
     Tcl_Exit, /* 133 */
     Tcl_ExposeCommand, /* 134 */
diff --git a/generic/tclTest.c b/generic/tclTest.c
index eb54dd7..0168a3d 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -916,7 +916,7 @@ AsyncHandlerProc(
     listArgv[3] = NULL;
     cmd = Tcl_Merge(3, listArgv);
     if (interp != NULL) {
-	code = Tcl_Eval(interp, cmd);
+	code = Tcl_EvalEx(interp, cmd, -1, 0);
     } else {
 	/*
 	 * this should not happen, but by definition of how async handlers are
@@ -1199,7 +1199,7 @@ TestcmdtraceCmd(
     if (strcmp(argv[1], "tracetest") == 0) {
 	Tcl_DStringInit(&buffer);
 	cmdTrace = Tcl_CreateTrace(interp, 50000, CmdTraceProc, &buffer);
-	result = Tcl_Eval(interp, argv[2]);
+	result = Tcl_EvalEx(interp, argv[2], -1, 0);
 	if (result == TCL_OK) {
 	    Tcl_ResetResult(interp);
 	    Tcl_AppendResult(interp, Tcl_DStringValue(&buffer), NULL);
@@ -1215,13 +1215,13 @@ TestcmdtraceCmd(
 	 */
 
 	cmdTrace = Tcl_CreateTrace(interp, 50000, CmdTraceDeleteProc, NULL);
-	Tcl_Eval(interp, argv[2]);
+	Tcl_EvalEx(interp, argv[2], -1, 0);
     } else if (strcmp(argv[1], "leveltest") == 0) {
 	Interp *iPtr = (Interp *) interp;
 	Tcl_DStringInit(&buffer);
 	cmdTrace = Tcl_CreateTrace(interp, iPtr->numLevels + 4, CmdTraceProc,
 		&buffer);
-	result = Tcl_Eval(interp, argv[2]);
+	result = Tcl_EvalEx(interp, argv[2], -1, 0);
 	if (result == TCL_OK) {
 	    Tcl_ResetResult(interp);
 	    Tcl_AppendResult(interp, Tcl_DStringValue(&buffer), NULL);
@@ -1239,7 +1239,7 @@ TestcmdtraceCmd(
 	cmdTrace = Tcl_CreateObjTrace(interp, 50000,
 		TCL_ALLOW_INLINE_COMPILATION, ObjTraceProc,
 		(ClientData) &deleteCalled, ObjTraceDeleteProc);
-	result = Tcl_Eval(interp, argv[2]);
+	result = Tcl_EvalEx(interp, argv[2], -1, 0);
 	Tcl_DeleteTrace(interp, cmdTrace);
 	if (!deleteCalled) {
 	    Tcl_SetResult(interp, "Delete wasn't called", TCL_STATIC);
@@ -1253,7 +1253,7 @@ TestcmdtraceCmd(
 	Tcl_DStringInit(&buffer);
 	t1 = Tcl_CreateTrace(interp, 1, CmdTraceProc, &buffer);
 	t2 = Tcl_CreateTrace(interp, 50000, CmdTraceProc, &buffer);
-	result = Tcl_Eval(interp, argv[2]);
+	result = Tcl_EvalEx(interp, argv[2], -1, 0);
 	if (result == TCL_OK) {
 	    Tcl_ResetResult(interp);
 	    Tcl_AppendResult(interp, Tcl_DStringValue(&buffer), NULL);
@@ -1582,7 +1582,7 @@ DelDeleteProc(
 {
     DelCmd *dPtr = clientData;
 
-    Tcl_Eval(dPtr->interp, dPtr->deleteCmd);
+    Tcl_EvalEx(dPtr->interp, dPtr->deleteCmd, -1, 0);
     Tcl_ResetResult(dPtr->interp);
     ckfree(dPtr->deleteCmd);
     ckfree(dPtr);
@@ -4918,7 +4918,7 @@ TestsaveresultCmd(
     if (((enum options) index) == RESULT_OBJECT) {
 	result = Tcl_EvalObjEx(interp, objv[2], 0);
     } else {
-	result = Tcl_Eval(interp, Tcl_GetString(objv[2]));
+	result = Tcl_EvalEx(interp, Tcl_GetString(objv[2]), -1, 0);
     }
 
     if (discard) {
@@ -6014,7 +6014,7 @@ TestReport(
 	}
 	Tcl_DStringEndSublist(&ds);
 	Tcl_SaveResult(interp, &savedResult);
-	Tcl_Eval(interp, Tcl_DStringValue(&ds));
+	Tcl_EvalEx(interp, Tcl_DStringValue(&ds), -1, 0);
 	Tcl_DStringFree(&ds);
 	Tcl_RestoreResult(interp, &savedResult);
    }
diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c
index 234b270..be510fc 100644
--- a/generic/tclTestProcBodyObj.c
+++ b/generic/tclTestProcBodyObj.c
@@ -143,7 +143,7 @@ RegisterCommand(
     if (cmdTablePtr->exportIt) {
 	sprintf(buf, "namespace eval %s { namespace export %s }",
 		namespace, cmdTablePtr->cmdName);
-	if (Tcl_Eval(interp, buf) != TCL_OK) {
+	if (Tcl_EvalEx(interp, buf, -1, 0) != TCL_OK) {
 	    return TCL_ERROR;
 	}
     }
diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c
index e718d34..ab0a169 100644
--- a/generic/tclThreadTest.c
+++ b/generic/tclThreadTest.c
@@ -613,7 +613,7 @@ NewTestThread(
      */
 
     Tcl_Preserve(tsdPtr->interp);
-    result = Tcl_Eval(tsdPtr->interp, threadEvalScript);
+    result = Tcl_EvalEx(tsdPtr->interp, threadEvalScript, -1, 0);
     if (result != TCL_OK) {
 	ThreadErrorProc(tsdPtr->interp);
     }
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 2dfd893..79bf0f8 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -1885,7 +1885,7 @@ TraceExecutionProc(
 	     * interpreter.
 	     */
 
-	    traceCode = Tcl_Eval(interp, Tcl_DStringValue(&cmd));
+	    traceCode = Tcl_EvalEx(interp, Tcl_DStringValue(&cmd), -1, 0);
 	    tcmdPtr->flags &= ~TCL_TRACE_EXEC_IN_PROGRESS;
 
 	    /*
@@ -1975,7 +1975,7 @@ TraceVarProc(
     int rewind = ((Interp *)interp)->execEnvPtr->rewind;
 
     /*
-     * We might call Tcl_Eval() below, and that might evaluate [trace vdelete]
+     * We might call Tcl_EvalEx() below, and that might evaluate [trace vdelete]
      * which might try to free tvarPtr. We want to use tvarPtr until the end
      * of this function, so we use Tcl_Preserve() and Tcl_Release() to be sure
      * it is not freed while we still need it.
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index e2cb3ea..ea3b9cc 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -763,7 +763,7 @@ Tcl_ZlibStreamInit(
      */
 
     if (interp != NULL) {
-	if (Tcl_Eval(interp, "::incr ::tcl::zlib::cmdcounter") != TCL_OK) {
+	if (Tcl_EvalEx(interp, "::incr ::tcl::zlib::cmdcounter", -1, 0) != TCL_OK) {
 	    goto error;
 	}
 	Tcl_DStringInit(&cmdname);
@@ -3847,7 +3847,7 @@ TclZlibInit(
      * commands.
      */
 
-    Tcl_Eval(interp, "namespace eval ::tcl::zlib {variable cmdcounter 0}");
+    Tcl_EvalEx(interp, "namespace eval ::tcl::zlib {variable cmdcounter 0}", -1, 0);
 
     /*
      * Create the public scripted interface to this file's functionality.
diff --git a/unix/Makefile.in b/unix/Makefile.in
index ee31282..f57d0ce 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -139,8 +139,8 @@ TCL_STUB_LIB_FLAG	= @TCL_STUB_LIB_FLAG@
 
 # To compile without backward compatibility and deprecated code uncomment the
 # following
-NO_DEPRECATED_FLAGS	=
-#NO_DEPRECATED_FLAGS	= -DTCL_NO_DEPRECATED
+#NO_DEPRECATED_FLAGS	=
+NO_DEPRECATED_FLAGS	= -DTCL_NO_DEPRECATED
 
 # Some versions of make, like SGI's, use the following variable to determine
 # which shell to use for executing commands:
diff --git a/unix/dltest/pkge.c b/unix/dltest/pkge.c
index a36ac30..c3380a7 100644
--- a/unix/dltest/pkge.c
+++ b/unix/dltest/pkge.c
@@ -41,5 +41,5 @@ Pkge_Init(
     if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
 	return TCL_ERROR;
     }
-    return Tcl_Eval(interp, script);
+    return Tcl_EvalEx(interp, script, -1, 0);
 }
diff --git a/win/Makefile.in b/win/Makefile.in
index 8582600..d061df2 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -84,8 +84,8 @@ CFLAGS = 		@CFLAGS@ @CFLAGS_DEFAULT@ -DUNICODE -D_UNICODE
 
 # To compile without backward compatibility and deprecated code uncomment the
 # following
-NO_DEPRECATED_FLAGS	=
-#NO_DEPRECATED_FLAGS	= -DTCL_NO_DEPRECATED
+#NO_DEPRECATED_FLAGS	=
+NO_DEPRECATED_FLAGS	= -DTCL_NO_DEPRECATED
 
 # To enable compilation debugging reverse the comment characters on one of the
 # following lines.
-- 
cgit v0.12