diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-27 12:06:40 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-27 12:06:40 (GMT) |
commit | 8ef8edabe2bb9d9fc6364861567a343f0c9f6f2c (patch) | |
tree | 093de949b687d61c7797d802193309d8568f0a0b /generic/tclVar.c | |
parent | ecf687e081191d5ebb3a46a54589f19e41a4d7d1 (diff) | |
parent | 47bc13b6d44edf2161eb16a0ae13020000cb8732 (diff) | |
download | tcl-8ef8edabe2bb9d9fc6364861567a343f0c9f6f2c.zip tcl-8ef8edabe2bb9d9fc6364861567a343f0c9f6f2c.tar.gz tcl-8ef8edabe2bb9d9fc6364861567a343f0c9f6f2c.tar.bz2 |
merge trunk.
Implement Tcl_VarTraceInfo and Tcl_UpVar as macro.
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r-- | generic/tclVar.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index 25edf5e..e153fa4 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -4391,60 +4391,6 @@ TclPtrObjMakeUpvar( /* *---------------------------------------------------------------------- * - * Tcl_UpVar -- - * - * This function links one variable to another, just like the "upvar" - * command. - * - * Results: - * A standard Tcl completion code. If an error occurs then an error - * message is left in the interp's result. - * - * Side effects: - * The variable in frameName whose name is given by varName becomes - * accessible under the name localNameStr, so that references to - * localNameStr are redirected to the other variable like a symbolic - * link. - * - *---------------------------------------------------------------------- - */ - -int -Tcl_UpVar( - Tcl_Interp *interp, /* Command interpreter in which varName is to - * be looked up. */ - const char *frameName, /* Name of the frame containing the source - * variable, such as "1" or "#0". */ - const char *varName, /* Name of a variable in interp to link to. - * May be either a scalar name or an element - * in an array. */ - const char *localNameStr, /* Name of link variable. */ - int flags) /* 0, TCL_GLOBAL_ONLY or TCL_NAMESPACE_ONLY: - * indicates scope of localNameStr. */ -{ - int result; - CallFrame *framePtr; - Tcl_Obj *varNamePtr, *localNamePtr; - - if (TclGetFrame(interp, frameName, &framePtr) == -1) { - return TCL_ERROR; - } - - varNamePtr = Tcl_NewStringObj(varName, -1); - Tcl_IncrRefCount(varNamePtr); - localNamePtr = Tcl_NewStringObj(localNameStr, -1); - Tcl_IncrRefCount(localNamePtr); - - result = ObjMakeUpvar(interp, framePtr, varNamePtr, NULL, 0, - localNamePtr, flags, -1); - Tcl_DecrRefCount(varNamePtr); - Tcl_DecrRefCount(localNamePtr); - return result; -} - -/* - *---------------------------------------------------------------------- - * * Tcl_UpVar2 -- * * This function links one variable to another, just like the "upvar" |