diff options
author | dgp <dgp@noemail.net> | 2011-04-21 18:50:37 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2011-04-21 18:50:37 (GMT) |
commit | ebcf2961fa0b3e1c27444b9437731a8cfed6d8da (patch) | |
tree | 76ea67633309e97f1f17146de543d16fafea0869 /generic/tclInt.h | |
parent | e9440d6e98706300a9d65fc87e7c9f9ed796e3dc (diff) | |
parent | ffed2c54ed012511c197909fb5c496f6b85225ab (diff) | |
download | tcl-ebcf2961fa0b3e1c27444b9437731a8cfed6d8da.zip tcl-ebcf2961fa0b3e1c27444b9437731a8cfed6d8da.tar.gz tcl-ebcf2961fa0b3e1c27444b9437731a8cfed6d8da.tar.bz2 |
Use macro to set List intreps
FossilOrigin-Name: 0353d21711e04b6b068512c7e65f019adc65467d
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 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) |