diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2007-11-11 19:32:12 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2007-11-11 19:32:12 (GMT) |
commit | e811f452678383f5d77a7848bef5d10c62d62925 (patch) | |
tree | 482aff3ad09aaa3302505eb6f172cd9d2e770ff0 /generic/tclDictObj.c | |
parent | 8139a5f733d5abf740e17c45a33dee8b607d2f7b (diff) | |
download | tcl-e811f452678383f5d77a7848bef5d10c62d62925.zip tcl-e811f452678383f5d77a7848bef5d10c62d62925.tar.gz tcl-e811f452678383f5d77a7848bef5d10c62d62925.tar.bz2 |
[Patch 1830038]: Increased usage of macros to detect and take advantage of objTypes.
Diffstat (limited to 'generic/tclDictObj.c')
-rw-r--r-- | generic/tclDictObj.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index d8e4165..6f2acc3 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.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: tclDictObj.c,v 1.50 2007/09/08 22:36:58 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.51 2007/11/11 19:32:14 msofer Exp $ */ #include "tclInt.h" @@ -302,12 +302,12 @@ UpdateStringOfDict( */ keyPtr = (Tcl_Obj *) Tcl_GetHashKey(&dict->table, hPtr); - elem = Tcl_GetStringFromObj(keyPtr, &length); + elem = TclGetStringFromObj(keyPtr, &length); dictPtr->length += Tcl_ScanCountedElement(elem, length, &flagPtr[i]) + 1; valuePtr = (Tcl_Obj *) Tcl_GetHashValue(hPtr); - elem = Tcl_GetStringFromObj(valuePtr, &length); + elem = TclGetStringFromObj(valuePtr, &length); dictPtr->length += Tcl_ScanCountedElement(elem, length, &flagPtr[i+1]) + 1; } @@ -321,13 +321,13 @@ UpdateStringOfDict( for (i=0,hPtr=Tcl_FirstHashEntry(&dict->table,&search) ; i<numElems ; i+=2,hPtr=Tcl_NextHashEntry(&search)) { keyPtr = (Tcl_Obj *) Tcl_GetHashKey(&dict->table, hPtr); - elem = Tcl_GetStringFromObj(keyPtr, &length); + elem = TclGetStringFromObj(keyPtr, &length); dst += Tcl_ConvertCountedElement(elem, length, dst, flagPtr[i] | (i==0 ? 0 : TCL_DONT_QUOTE_HASH) ); *(dst++) = ' '; valuePtr = (Tcl_Obj *) Tcl_GetHashValue(hPtr); - elem = Tcl_GetStringFromObj(valuePtr, &length); + elem = TclGetStringFromObj(valuePtr, &length); dst += Tcl_ConvertCountedElement(elem, length, dst, flagPtr[i+1] | TCL_DONT_QUOTE_HASH); *(dst++) = ' '; @@ -388,7 +388,7 @@ SetDictFromAny( int objc, i; Tcl_Obj **objv; - if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) { + if (TclListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) { return TCL_ERROR; } if (objc & 1) { @@ -405,7 +405,7 @@ SetDictFromAny( */ if (Tcl_IsShared(objPtr)) { - (void) Tcl_GetString(objPtr); + (void) TclGetString(objPtr); } /* @@ -438,7 +438,7 @@ SetDictFromAny( * Get the string representation. Make it up-to-date if necessary. */ - string = Tcl_GetStringFromObj(objPtr, &length); + string = TclGetStringFromObj(objPtr, &length); limit = (string + length); /* @@ -2187,7 +2187,7 @@ DictForCmd( return TCL_ERROR; } - if (Tcl_ListObjGetElements(interp, objv[2], &varc, &varv) != TCL_OK) { + if (TclListObjGetElements(interp, objv[2], &varc, &varv) != TCL_OK) { return TCL_ERROR; } if (varc != 2) { @@ -2512,7 +2512,7 @@ DictFilterCmd( * copying from the "dict for" implementation has occurred! */ - if (Tcl_ListObjGetElements(interp, objv[4], &varc, &varv) != TCL_OK) { + if (TclListObjGetElements(interp, objv[4], &varc, &varv) != TCL_OK) { return TCL_ERROR; } if (varc != 2) { @@ -2918,7 +2918,7 @@ DictWithCmd( * Now process our updates on the leaf dictionary. */ - Tcl_ListObjGetElements(NULL, keysPtr, &keyc, &keyv); + TclListObjGetElements(NULL, keysPtr, &keyc, &keyv); for (i=0 ; i<keyc ; i++) { valPtr = Tcl_ObjGetVar2(interp, keyv[i], NULL, 0); if (valPtr == NULL) { |