- From: Olaf Walkowiak <olaf@sevenval.de>
- Date: Tue, 15 Aug 2000 12:44:36 +0200
- To: www-lib@w3.org
Hello,
there is a little flaw in HTArray.h:
#define HTArray_firstObject(me, data) \
((me) && ((data)=(me)->data) ? *(data)++ : NULL)
#define HTArray_nextObject(me, data) \
((me) && (data) ? *(data)++ : NULL)
If you use another name for "data", f.e. :
foo = HTArray_firstObject(pool->pointers, bar);
you get the error message "Structure has no member named bar", since
(me)->data will be replaced by bar->bar, not bar->data.
This will fix it:
#define HTArray_firstObject(me, _data) \
((me) && ((_data)=(me)->data) ? *(_data)++ : NULL)
#define HTArray_nextObject(me, _data) \
((me) && (_data) ? *(_data)++ : NULL)
CU
Olaf
--
Received on Tuesday, 15 August 2000 06:44:47 UTC