diff options
author | dgp <dgp@users.sourceforge.net> | 2011-04-21 18:44:38 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-04-21 18:44:38 (GMT) |
commit | 8bcda731ae34f234a8894fe1f2de0d06ce951b72 (patch) | |
tree | 915af8c1d0d451362dfe388a73ff338cbeccc4f0 /generic/tclInt.h | |
parent | fb1e4a18589dcd6dcf8bab488503e3ce89873098 (diff) | |
download | tcl-8bcda731ae34f234a8894fe1f2de0d06ce951b72.zip tcl-8bcda731ae34f234a8894fe1f2de0d06ce951b72.tar.gz tcl-8bcda731ae34f234a8894fe1f2de0d06ce951b72.tar.bz2 |
Use macro to set List intreps
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index e410a1d..0705492 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2203,6 +2203,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) |