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/2008-February/076965.html below:

[Python-Dev] Py_CLEAR to avoid crashes

[Python-Dev] Py_CLEAR to avoid crashes [Python-Dev] Py_CLEAR to avoid crashes"Martin v. Löwis" martin at v.loewis.de
Tue Feb 19 00:56:43 CET 2008
> That sucks.  Most Py_DECREF calls are probably okay but it's going
> to be hard to find the ones that are not.

Methinks that

egrep 'DECREF\([a-zA-Z0-9_]->[a-zA-Z0-9_]+\)' */*.c

gives a good overview - you should never DECREF a variable on heap.
In the trunk, this command finds 36 candidates. Now, some of them
are in tp_dealloc methods, so they shouldn't cause problems - but
it can't hurt to replace them with Py_CLEAR, either.

Regards,
Martin
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