summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-04-21 18:50:37 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-04-21 18:50:37 (GMT)
commit97ca190e3033a85ba2f074151fbedb986b531def (patch)
tree76ea67633309e97f1f17146de543d16fafea0869 /generic/tclInt.h
parentd3a0ad0b83779f8b3ad8b665c8a64461dfc56b33 (diff)
parent8bcda731ae34f234a8894fe1f2de0d06ce951b72 (diff)
downloadtcl-97ca190e3033a85ba2f074151fbedb986b531def.zip
tcl-97ca190e3033a85ba2f074151fbedb986b531def.tar.gz
tcl-97ca190e3033a85ba2f074151fbedb986b531def.tar.bz2
Use macro to set List intreps
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 67aee93..fe06573 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -2451,6 +2451,12 @@ typedef struct List {
#define ListRepPtr(listPtr) \
((List *) (listPtr)->internalRep.twoPtrValue.ptr1)
+#define ListSetIntRep(objPtr, listRepPtr) \
+ (objPtr)->internalRep.twoPtrValue.ptr1 = (void *)(listRepPtr), \
+ (objPtr)->internalRep.twoPtrValue.ptr2 = NULL, \
+ (listRepPtr)->refCount++, \
+ (objPtr)->typePtr = &tclListType
+
#define ListObjGetElements(listPtr, objc, objv) \
((objv) = &(ListRepPtr(listPtr)->elements), \
(objc) = ListRepPtr(listPtr)->elemCount)