A RetroSearch Logo

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

Search Query:

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

C API Macro to decref andset to NULL)

WHUI! (was Re: [Python-Dev] Proposal: C API Macro to decref andset to NULL) WHUI! (was Re: [Python-Dev] Proposal: C API Macro to decref andset to NULL)Jim Fulton jim at zope.com
Tue Jul 13 17:29:35 CEST 2004
Jeremy Hylton wrote:
>>I still don't like it, because it hides the return.
> 
> 
> It should be used in the core, but you don't have to use it in your own
> code.
> 
> 
>>I'd rather do:
>>
>>	if (self->foo != NULL && (vret = visit(self->foo, arg)))
>>		return vret;
> 
> 
> This violates the Python C style by putting an assignment in a conditional.
> You'd need to put the assignment to vret inside the body of an if statement.
> In other words, it would look just like the expansion of the VISIT() macro.

Except that you would see the return statement.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org
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