diff options
author | dgp <dgp@noemail.net> | 2011-04-18 18:50:41 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2011-04-18 18:50:41 (GMT) |
commit | b82093c05dfdef1b0495d2302dd6cbef726f5f10 (patch) | |
tree | 8d78f56622c7353be617d046b3586a18a8ca4ae1 /generic/tclBasic.c | |
parent | b9e223437ec3cddc8b6dbdaf83f7972c5c0cf45d (diff) | |
parent | 85569bece28a67fb36aa388e7940ab94283ff653 (diff) | |
download | tcl-b82093c05dfdef1b0495d2302dd6cbef726f5f10.zip tcl-b82093c05dfdef1b0495d2302dd6cbef726f5f10.tar.gz tcl-b82093c05dfdef1b0495d2302dd6cbef726f5f10.tar.bz2 |
Define and use macros that test whether a Tcl list value is canonical.
FossilOrigin-Name: 4b0bb72cb337b8f2ca6bd99b43d8cd9b72f703ad
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 4c826f3..2da455b 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -5717,8 +5717,7 @@ TclArgumentGet( * up by the caller. It knows better than us. */ - if ((!obj->bytes) || ((obj->typePtr == &tclListType) && - ((List *) obj->internalRep.twoPtrValue.ptr1)->canonicalFlag)) { + if ((obj->bytes == NULL) || TclListObjIsCanonical(obj)) { return; } @@ -5897,7 +5896,6 @@ TclNREvalObjEx( { Interp *iPtr = (Interp *) interp; int result; - List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; /* * This function consists of three independent blocks for: direct @@ -5905,9 +5903,7 @@ TclNREvalObjEx( * finally direct evaluation. Precisely one of these blocks will be run. */ - if ((objPtr->typePtr == &tclListType) && /* is a list */ - ((objPtr->bytes == NULL || /* no string rep */ - listRepPtr->canonicalFlag))) { /* or is canonical */ + if (TclListObjIsCanonical(objPtr)) { Tcl_Obj *listPtr = objPtr; CmdFrame *eoFramePtr = NULL; int objc; |