diff options
author | Kevin B Kenny <kennykb@acm.org> | 2004-08-18 19:58:56 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2004-08-18 19:58:56 (GMT) |
commit | fab56e2415bbbc5e2355f500b28d26c5e907ef29 (patch) | |
tree | 0bfbd9e68acb81b08b317b956ce8ac4cca0824cd /generic/tclInterp.c | |
parent | dcdb6368302f0bb38e0d11e8c2d346b684507b07 (diff) | |
download | tcl-fab56e2415bbbc5e2355f500b28d26c5e907ef29.zip tcl-fab56e2415bbbc5e2355f500b28d26c5e907ef29.tar.gz tcl-fab56e2415bbbc5e2355f500b28d26c5e907ef29.tar.bz2 |
TIP #173 and #209 implementation - see ChangeLog for details
Diffstat (limited to 'generic/tclInterp.c')
-rw-r--r-- | generic/tclInterp.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 12a2a8b..70c3356 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.43 2004/08/02 20:55:37 dgp Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.44 2004/08/18 19:59:00 kennykb Exp $ */ #include "tclInt.h" @@ -2003,6 +2003,8 @@ SlaveCreate(interp, pathPtr, safe) char *path; int new, objc; Tcl_Obj **objv; + Tcl_Obj* clockObj; + int status; if (Tcl_ListObjGetElements(interp, pathPtr, &objc, &objv) != TCL_OK) { return NULL; @@ -2071,10 +2073,23 @@ SlaveCreate(interp, pathPtr, safe) */ InheritLimitsFromMaster(slaveInterp, masterInterp); + if ( safe ) { + clockObj = Tcl_NewStringObj( "clock", -1 ); + Tcl_IncrRefCount( clockObj ); + status = AliasCreate( interp, slaveInterp, masterInterp, + clockObj, clockObj, 0, (Tcl_Obj *CONST *) NULL ); + Tcl_DecrRefCount( clockObj ); + if ( status != TCL_OK ) { + goto error2; + } + } + + return slaveInterp; - error: + error: TclTransferResult(slaveInterp, TCL_ERROR, interp); + error2: Tcl_DeleteInterp(slaveInterp); return NULL; |