diff options
author | stanton <stanton> | 1999-02-10 23:31:10 (GMT) |
---|---|---|
committer | stanton <stanton> | 1999-02-10 23:31:10 (GMT) |
commit | bcc73119d3301482376ec5d7876b49b28e615e75 (patch) | |
tree | d13f4f917b1cc9bcb348bfb160c43812ede3fcc1 /generic/tclBasic.c | |
parent | 346e62b0d3e9ae361bfab66add2936891f6f299e (diff) | |
download | tcl-bcc73119d3301482376ec5d7876b49b28e615e75.zip tcl-bcc73119d3301482376ec5d7876b49b28e615e75.tar.gz tcl-bcc73119d3301482376ec5d7876b49b28e615e75.tar.bz2 |
* unix/mkLinks:
* doc/SetVar.3:
* generic/tcl.h:
* generic/tclVar.c: Restored Tcl_ObjGetVar2 and Tcl_ObjSetVar2
from 8.0. Renamed Tcl_Get/SetObjVar2 to Tcl_GetVar2Ex and
Tcl_SetVar2Ex.
* Merged 8.0.5b2 patches
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 92902da8..3ea4d08 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -7,12 +7,12 @@ * * Copyright (c) 1987-1994 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 1998 by Scriptics Corporation. + * Copyright (c) 1998-1999 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.1.2.7 1999/02/01 21:29:49 stanton Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.1.2.8 1999/02/10 23:31:12 stanton Exp $ */ #include "tclInt.h" @@ -1417,7 +1417,7 @@ Tcl_CreateCommand(interp, cmdName, proc, clientData, deleteProc) Command *cmdPtr, *refCmdPtr; Tcl_HashEntry *hPtr; char *tail; - int new, result; + int new; ImportedCmdData *dataPtr; if (iPtr->flags & DELETED) { @@ -1436,10 +1436,9 @@ Tcl_CreateCommand(interp, cmdName, proc, clientData, deleteProc) */ if (strstr(cmdName, "::") != NULL) { - result = TclGetNamespaceForQualName(interp, cmdName, - (Namespace *) NULL, CREATE_NS_IF_UNKNOWN, &nsPtr, - &dummy1, &dummy2, &tail); - if ((result != TCL_OK) || (nsPtr == NULL) || (tail == NULL)) { + TclGetNamespaceForQualName(interp, cmdName, (Namespace *) NULL, + CREATE_NS_IF_UNKNOWN, &nsPtr, &dummy1, &dummy2, &tail); + if ((nsPtr == NULL) || (tail == NULL)) { return (Tcl_Command) NULL; } } else { @@ -1564,7 +1563,7 @@ Tcl_CreateObjCommand(interp, cmdName, proc, clientData, deleteProc) Command *cmdPtr, *refCmdPtr; Tcl_HashEntry *hPtr; char *tail; - int new, result; + int new; ImportedCmdData *dataPtr; if (iPtr->flags & DELETED) { @@ -1583,10 +1582,9 @@ Tcl_CreateObjCommand(interp, cmdName, proc, clientData, deleteProc) */ if (strstr(cmdName, "::") != NULL) { - result = TclGetNamespaceForQualName(interp, cmdName, - (Namespace *) NULL, CREATE_NS_IF_UNKNOWN, &nsPtr, - &dummy1, &dummy2, &tail); - if ((result != TCL_OK) || (nsPtr == NULL) || (tail == NULL)) { + TclGetNamespaceForQualName(interp, cmdName, (Namespace *) NULL, + CREATE_NS_IF_UNKNOWN, &nsPtr, &dummy1, &dummy2, &tail); + if ((nsPtr == NULL) || (tail == NULL)) { return (Tcl_Command) NULL; } } else { @@ -1914,12 +1912,9 @@ TclRenameCommand(interp, oldName, newName) * Tcl_CreateCommand would. */ - result = TclGetNamespaceForQualName(interp, newName, (Namespace *) NULL, - (CREATE_NS_IF_UNKNOWN | TCL_LEAVE_ERR_MSG), - &newNsPtr, &dummy1, &dummy2, &newTail); - if (result != TCL_OK) { - return result; - } + TclGetNamespaceForQualName(interp, newName, (Namespace *) NULL, + CREATE_NS_IF_UNKNOWN, &newNsPtr, &dummy1, &dummy2, &newTail); + if ((newNsPtr == NULL) || (newTail == NULL)) { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "can't rename to \"", newName, "\": bad command name", @@ -3960,7 +3955,7 @@ Tcl_AddObjErrorInfo(interp, message, length) iPtr->flags |= ERR_IN_PROGRESS; if (iPtr->result[0] == 0) { - (void) Tcl_SetObjVar2(interp, "errorInfo", NULL, iPtr->objResultPtr, + (void) Tcl_SetVar2Ex(interp, "errorInfo", NULL, iPtr->objResultPtr, TCL_GLOBAL_ONLY); } else { /* use the string result */ Tcl_SetVar2(interp, "errorInfo", (char *) NULL, interp->result, @@ -3985,7 +3980,7 @@ Tcl_AddObjErrorInfo(interp, message, length) if (length != 0) { messagePtr = Tcl_NewStringObj(message, length); Tcl_IncrRefCount(messagePtr); - Tcl_SetObjVar2(interp, "errorInfo", NULL, messagePtr, + Tcl_SetVar2Ex(interp, "errorInfo", NULL, messagePtr, (TCL_GLOBAL_ONLY | TCL_APPEND_VALUE)); Tcl_DecrRefCount(messagePtr); /* free msg object appended above */ } |