[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.217,2.218
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)).
if (pointer == NULL)
is perfectly legal C.
Moshe Zadka <firstname.lastname@example.org>
This is a signature anti-virus.
Please stop the spread of signature viruses!