Le ven. 10 avr. 2020 à 22:00, Antoine Pitrou <solip...@pitrou.net> a écrit :
> How do you keep fast type checking such as PyTuple_Check() if extension
> code doesn't have access e.g. to tp_flags?
>
> I notice you did:
> """
> Add fast inlined version _PyType_HasFeature() and _PyType_IS_GC()
> for object.c and typeobject.c.
> """
>
> So you understand there is a need.

By the way, CPython currently uses statically allocated types for
builtin types like str or list. This may have to change to run
efficiently multiple subinterepters in parallel: each subinterpeter
should have its own heap-allocated type with its own reference
counter.

Using heap allocated types means that PyUnicode_Check() implementation
has to change. It's just another good reason to better hide
PyUnicode_Check() implementation right now ;-)

Victor
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/EIEBID2VQKZN6Z3XSAS6LMVHKCIOKHAI/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to