[Python-Dev] Proposal: C API Macro to decref and set to NULL
Delaney, Timothy C (Timothy)
tdelaney at avaya.com
Tue Jul 13 01:54:03 CEST 2004
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)?
Tim Delaney
More information about the Python-Dev
mailing list