diff options
author | dgp <dgp@users.sourceforge.net> | 2013-04-11 19:36:37 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-04-11 19:36:37 (GMT) |
commit | 064f7e5513e1c51e2e1501e4ee4c223bd689de35 (patch) | |
tree | 4dea2215642cc19c35fd70cf3a350bad6195c516 /generic/tclInterp.c | |
parent | 65978723356ae1cc7caa39411544d5f9a190b154 (diff) | |
download | tcl-064f7e5513e1c51e2e1501e4ee4c223bd689de35.zip tcl-064f7e5513e1c51e2e1501e4ee4c223bd689de35.tar.gz tcl-064f7e5513e1c51e2e1501e4ee4c223bd689de35.tar.bz2 |
More revisions let multi-interp test case work, but at cost of panics
and segfaults. Pushing the NRE-envelope.
Diffstat (limited to 'generic/tclInterp.c')
-rw-r--r-- | generic/tclInterp.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c index ac51d9d..e9ed790 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -279,6 +279,7 @@ static void DeleteScriptLimitCallback(ClientData clientData); static void RunLimitHandlers(LimitHandler *handlerPtr, Tcl_Interp *interp); static void TimeLimitCallback(ClientData clientData); +static Tcl_NRPostProc NRPostInvokeHidden; /* *---------------------------------------------------------------------- @@ -3056,7 +3057,9 @@ SlaveInvokeHidden( Tcl_Release(slaveInterp); return TclNRInvoke(NULL, slaveInterp, objc, objv); } else { - result = TclObjInvoke(slaveInterp, objc, objv, TCL_INVOKE_HIDDEN); + Tcl_NRAddCallback(interp, NRPostInvokeHidden, slaveInterp, + NULL, NULL, NULL); + return TclNRInvoke(NULL, slaveInterp, objc, objv); } } else { Namespace *nsPtr, *dummy1, *dummy2; @@ -3076,6 +3079,19 @@ SlaveInvokeHidden( Tcl_Release(slaveInterp); return result; } + +static int +NRPostInvokeHidden( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Tcl_Interp *slaveInterp = (Tcl_Interp *)data[0]; + + Tcl_TransferResult(slaveInterp, result, interp); + Tcl_Release(slaveInterp); + return result; +} /* *---------------------------------------------------------------------- |