[Python-Dev] Proposal: C API Macro to decref and set to NULL
Bob Ippolito
bob at redivi.com
Tue Jul 13 02:37:11 CEST 2004
On Jul 12, 2004, at 7:54 PM, Delaney, Timothy C (Timothy) wrote:
> Tim Peters wrote:
>
>> BTW, re-invented at least as often is a VISIT macro for use in
>> tp_traverse slots, like typeobject.c's (and several other files')
>>
>> #define VISIT(SLOT) \
>> if (SLOT) { \
>> err = visit((PyObject *)(SLOT), arg); \
>> if (err) \
>> return err; \
>> }
>
> Shouldn't this also be wrapped in a do {} while (0)?
I think it's obvious that this macro has not been made generic yet,
given that err, visit, and arg aren't defined anywhere.
-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-dev/attachments/20040712/66f726dc/smime.bin
More information about the Python-Dev
mailing list