WHUI! (was Re: [Python-Dev] Proposal: C API Macro to decrefand set to NULL) (original) (raw)
Raymond Hettinger python at rcn.com
Thu Jul 15 15:17:48 CEST 2004
- Previous message: WHUI! (was Re: [Python-Dev] Proposal: C API Macro to decref and set to NULL)
- Next message: WHUI! (was Re: [Python-Dev] Proposal: C API Macro to decref and set to NULL)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Almost all tptraverse implementations can (and should) look exactly alike:
PyVISIT(member1); PyVISIT(member2); ... PyVISIT(membern); return 0;
It does get a little more complicated for containers that loop over their contents and possibly have other PyObject * fields also.
Still, I applied the macro to collections and itertools and found it to be straight-forward and easy to use.
Raymond
- Previous message: WHUI! (was Re: [Python-Dev] Proposal: C API Macro to decref and set to NULL)
- Next message: WHUI! (was Re: [Python-Dev] Proposal: C API Macro to decref and set to NULL)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]