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/2001-January/011564.html below:

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.217,2.218

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.217,2.218Moshe Zadka moshez@zadka.site.co.il
Fri, 12 Jan 2001 11:53:35 +0200 (IST)
On Thu, 11 Jan 2001, "Mark Hammond" <MarkH@ActiveState.com> wrote:

> I think it bad style indeed - for example, I could see benefit in having
> DECREF (or _Py_Dealloc, called by decref) set the object to NULL in debug
> builds.  What if that decision is taken in the future?
> 
> I thought rules were pretty clear with reference counting - dont assume
> _anything_ about the object unless you hold a reference (or are damn sure
> someone else does!)

I'm not assuming anything about the object -- I'm assuming something
about the pointer. And macros should not change their arguments --
DECREF is basically a wrapper around _Py_Dealloc((PyObject *)(op)).

Just like

free(pointer);
if (pointer == NULL) 
	do_something();
is perfectly legal C.

-- 
Moshe Zadka <sig@zadka.site.co.il>
This is a signature anti-virus. 
Please stop the spread of signature viruses!



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