summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-04-18 18:50:41 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-04-18 18:50:41 (GMT)
commit66a254dddfb0c618ee609c6bfab4a6549e098772 (patch)
tree8d78f56622c7353be617d046b3586a18a8ca4ae1 /generic/tclBasic.c
parent76259f2d58dc67f1a0095a1891696b69167c3902 (diff)
parent50920cb27bda1113bd1e4edf637f4a6d03c8d63a (diff)
downloadtcl-66a254dddfb0c618ee609c6bfab4a6549e098772.zip
tcl-66a254dddfb0c618ee609c6bfab4a6549e098772.tar.gz
tcl-66a254dddfb0c618ee609c6bfab4a6549e098772.tar.bz2
Define and use macros that test whether a Tcl list value is canonical.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c8
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;