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/2010-March/098112.html below:

[Python-Dev] Caching function pointers in type objects

[Python-Dev] Caching function pointers in type objectsReid Kleckner rnk at mit.edu
Wed Mar 3 04:06:41 CET 2010
I don't think this will help you solve your problem, but one thing
we've done in unladen swallow is to hack PyType_Modified to invalidate
our own descriptor caches.  We may eventually want to extend that into
a callback interface, but it probably will never be considered an API
that outside code should depend on.

Reid

On Tue, Mar 2, 2010 at 9:57 PM, Benjamin Peterson <benjamin at python.org> wrote:
> 2010/3/2 Daniel Stutzbach <daniel at stutzbachenterprises.com>:
>> In CPython, is it safe to cache function pointers that are in type objects?
>>
>> For example, if I know that some_type->tp_richcompare is non-NULL, and I
>> call it (which may execute arbitrary user code), can I assume that
>> some_type->tp_richcompare is still non-NULL?
>
> Not unless it's builtin. Somebody could have deleted the rich
> comparison methods.
>
>
>
> --
> Regards,
> Benjamin
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/reid.kleckner%40gmail.com
>
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