diff options
author | dgp <dgp@noemail.net> | 2011-04-21 18:44:38 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2011-04-21 18:44:38 (GMT) |
commit | ffed2c54ed012511c197909fb5c496f6b85225ab (patch) | |
tree | 915af8c1d0d451362dfe388a73ff338cbeccc4f0 /generic/tclInt.h | |
parent | 2a1de6731749d028cf99d91b1f13bde641463c08 (diff) | |
download | tcl-ffed2c54ed012511c197909fb5c496f6b85225ab.zip tcl-ffed2c54ed012511c197909fb5c496f6b85225ab.tar.gz tcl-ffed2c54ed012511c197909fb5c496f6b85225ab.tar.bz2 |
Use macro to set List intreps
FossilOrigin-Name: ecb9834d126d4001ef657d13c2a9ec64267a08af
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) |