[Python-Dev] Proposal: C API Macro to decref and set to NULL (original) (raw)

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 tptraverse 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