A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-July/046247.html below:

C API Macro to decrefand set to NULL)

WHUI! (was Re: [Python-Dev] Proposal: C API Macro to decrefand set to NULL) WHUI! (was Re: [Python-Dev] Proposal: C API Macro to decrefand set to NULL)Raymond Hettinger python at rcn.com
Thu Jul 15 15:17:48 CEST 2004
> Almost all tp_traverse implementations can (and should) look exactly
> alike:
> 
> Py_VISIT(member1);
> Py_VISIT(member2);
> ...
> Py_VISIT(member_n);
> 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



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4