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