summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 5bccd2e..a633a85 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.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: tclBasic.c,v 1.201 2006/10/23 21:36:54 msofer Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.202 2006/10/23 22:49:24 msofer Exp $
*/
#include "tclInt.h"
@@ -362,6 +362,8 @@ Tcl_CreateInterp(void)
if (iPtr->globalNsPtr == NULL) {
Tcl_Panic("Tcl_CreateInterp: can't create global namespace");
}
+ iPtr->callObjc = 0;
+ iPtr->callObjv = NULL;
/*
* Initialise the rootCallframe. It cannot be allocated on the stack, as
@@ -3301,6 +3303,16 @@ TclEvalObjvInternal(
}
}
+
+ /*
+ * Record the calling objc/objv except if requested not to
+ */
+
+ if (!(flags & TCL_EVAL_NOREWRITE)) {
+ iPtr->callObjc = objc;
+ iPtr->callObjv = objv;
+ }
+
/*
* Find the function to execute this command. If there isn't one, then see
* if there is an unknown command handler registered for this namespace.