diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-07-16 22:08:59 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-07-16 22:08:59 (GMT) |
commit | 50c3ec45e663031133f8f9024976f0d5501a3f46 (patch) | |
tree | 5b9a400f27bd9a63da7d8ee2cf2d277ed927df28 /generic/tclOOBasic.c | |
parent | 98c0b4df207d373b44cdb132ffa4f3404b245e57 (diff) | |
download | tcl-50c3ec45e663031133f8f9024976f0d5501a3f46.zip tcl-50c3ec45e663031133f8f9024976f0d5501a3f46.tar.gz tcl-50c3ec45e663031133f8f9024976f0d5501a3f46.tar.bz2 |
NRE-aware TclOO.
Diffstat (limited to 'generic/tclOOBasic.c')
-rw-r--r-- | generic/tclOOBasic.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 1cd07df..0af3a0b 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.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: tclOOBasic.c,v 1.1 2008/05/31 11:42:17 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.2 2008/07/16 22:09:01 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -17,6 +17,9 @@ #endif #include "tclInt.h" #include "tclOOInt.h" + +static int RestoreFrame(ClientData data[], + Tcl_Interp *interp, int result); /* * ---------------------------------------------------------------------- @@ -581,7 +584,6 @@ TclOONextObjCmd( Interp *iPtr = (Interp *) interp; CallFrame *framePtr = iPtr->varFramePtr; Tcl_ObjectContext context; - int result; /* * Start with sanity checks on the calling context to make sure that we @@ -601,9 +603,20 @@ TclOONextObjCmd( * that this is like [uplevel 1] and not [eval]. */ + TclNR_AddCallback(interp, RestoreFrame, framePtr, NULL, NULL, NULL); iPtr->varFramePtr = framePtr->callerVarPtr; - result = Tcl_ObjectContextInvokeNext(interp, context, objc, objv, 1); - iPtr->varFramePtr = framePtr; + return TclNRObjectContextInvokeNext(interp, context, objc, objv, 1); +} + +static int +RestoreFrame( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + + iPtr->varFramePtr = data[0]; return result; } |