[Patches] [ python-Patches-1103046 ] Boxing up PyDECREF correctly
SourceForge.net
noreply at sourceforge.net
Sun Jan 16 01:34:37 CET 2005
Patches item #1103046, was opened at 2005-01-15 14:34
Message generated for change (Comment added) made by tim_one
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1103046&group_id=5470
Category: Core (C code)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Norbert Nemec (nnemec)
Assigned to: Nobody/Anonymous (nobody)
Summary: Boxing up PyDECREF correctly
Initial Comment:
The patch below solves problem in cases like:
if(something)
PyDECREF(xxx)
else
dosomethingelse();
(Patch against Python 2.4)
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2005-01-15 19:34
Message:
Logged In: YES
user_id=31435
What problem? It's intended that you put a semicolon
following Py_DECREF() invocations, and if you do I don't see
any problem here.
The "do ... while(0)" trick isn't optimized away by all
compilers, so it's not without cost. Because Py_DECREF
appears a *lot* in the source code, I don't want its
expansion to introduce needless overheads.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1103046&group_id=5470
More information about the Patches
mailing list