diff options
author | dgp <dgp@users.sourceforge.net> | 2016-05-25 18:19:27 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-05-25 18:19:27 (GMT) |
commit | 7be6a12649deec9f9d70b5d1a53140b5e0be42e0 (patch) | |
tree | 719814e131c5f6ea0a0113a8f3ae99d940aaf56a /generic | |
parent | ec75618b67ba6350be88fd617aac6122cecc5250 (diff) | |
download | tcl-7be6a12649deec9f9d70b5d1a53140b5e0be42e0.zip tcl-7be6a12649deec9f9d70b5d1a53140b5e0be42e0.tar.gz tcl-7be6a12649deec9f9d70b5d1a53140b5e0be42e0.tar.bz2 |
Put in some missing Resets.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclExecute.c | 4 | ||||
-rw-r--r-- | generic/tclOODefineCmds.c | 22 |
2 files changed, 19 insertions, 7 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 80598c1..61d75cb 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -3174,7 +3174,9 @@ TEBCresume( } if (!TclInitRewriteEnsemble(interp, opnd, 1, objv)) { -//fprintf(stdout, "INVOKE: '%s'\n", Tcl_GetString(objPtr)); fflush(stdout); +fprintf(stdout, "SOURCE: '%s'\n", Tcl_GetString( + ((Interp *)interp)->ensembleRewrite.sourceObjs[0])); fflush(stdout); +fprintf(stdout, "INVOKE: '%s'\n", Tcl_GetString(objPtr)); fflush(stdout); Tcl_Panic("INST_INVOKE_REPLACE is not ensemble root"); } DECACHE_STACK_INFO(); diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index 64209a0..8747ff5 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -848,7 +848,7 @@ TclOODefineObjCmd( } else { Tcl_Obj *objPtr, *obj2Ptr, **objs; Tcl_Command cmd; - int dummy; + int isRoot, dummy; /* * More than one argument: fire them through the ensemble processing @@ -860,7 +860,7 @@ TclOODefineObjCmd( * the moment. Ugly! */ - TclInitRewriteEnsemble(interp, 3, 1, objv); + isRoot = TclInitRewriteEnsemble(interp, 3, 1, objv); /* * Build the list of arguments using a Tcl_Obj as a workspace. See @@ -882,6 +882,9 @@ TclOODefineObjCmd( Tcl_ListObjGetElements(NULL, objPtr, &dummy, &objs); result = Tcl_EvalObjv(interp, objc-2, objs, TCL_EVAL_INVOKE); + if (isRoot) { + TclResetRewriteEnsemble(interp, 1); + } Tcl_DecrRefCount(objPtr); } DelRef(oPtr); @@ -915,7 +918,7 @@ TclOOObjDefObjCmd( Tcl_Obj *const *objv) { Foundation *fPtr = TclOOGetFoundation(interp); - int result; + int isRoot, result; Object *oPtr; if (objc < 3) { @@ -963,7 +966,7 @@ TclOOObjDefObjCmd( * the moment. Ugly! */ - TclInitRewriteEnsemble(interp, 3, 1, objv); + isRoot = TclInitRewriteEnsemble(interp, 3, 1, objv); /* * Build the list of arguments using a Tcl_Obj as a workspace. See @@ -985,6 +988,10 @@ TclOOObjDefObjCmd( Tcl_ListObjGetElements(NULL, objPtr, &dummy, &objs); result = Tcl_EvalObjv(interp, objc-2, objs, TCL_EVAL_INVOKE); + + if (isRoot) { + TclResetRewriteEnsemble(interp, 1); + } Tcl_DecrRefCount(objPtr); } DelRef(oPtr); @@ -1054,7 +1061,7 @@ TclOODefineSelfObjCmd( } else { Tcl_Obj *objPtr, *obj2Ptr, **objs; Tcl_Command cmd; - int dummy; + int isRoot, dummy; /* * More than one argument: fire them through the ensemble processing @@ -1066,7 +1073,7 @@ TclOODefineSelfObjCmd( * the moment. Ugly! */ - TclInitRewriteEnsemble(interp, 2, 1, objv); + isRoot = TclInitRewriteEnsemble(interp, 2, 1, objv); /* * Build the list of arguments using a Tcl_Obj as a workspace. See @@ -1088,6 +1095,9 @@ TclOODefineSelfObjCmd( Tcl_ListObjGetElements(NULL, objPtr, &dummy, &objs); result = Tcl_EvalObjv(interp, objc-1, objs, TCL_EVAL_INVOKE); + if (isRoot) { + TclResetRewriteEnsemble(interp, 1); + } Tcl_DecrRefCount(objPtr); } DelRef(oPtr); |