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/2003-April/034471.html below:

[Python-Dev] Re: tp_clear return value

[Python-Dev] Re: tp_clear return valueJeremy Hylton jeremy@zope.com
10 Apr 2003 15:13:12 -0400
On Thu, 2003-04-10 at 14:09, Tim Peters wrote:
> I'm not suggesting adding setjmp/longjmp to the Python language <0.9 wink>.
> I'm suggesting using them for two specific and obscure gc module callbacks
> that aren't normally used (*most* of the gc module callbacks wouldn't use
> setjmp/longjmp); in return, mounds of frequently executed code like

...

> could become the simpler and faster

...

Sure sounds good to me.

If traverse worked this way, the traverse and clear slots and a part of
the dealloc slot become almost identical.  The take all PyObject *
members in the struct and perform some action on them if they are
non-NULL.  dealloc performs a DECREF.  clear performs a DECREF + assign
NULL.  traverse calls visit.  It sure makes it easy to verify that each
is implemented correctly.  It would be cool if there were a way to
automate some of the boilerplate.

Jeremy






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