[Python-Dev] PEP 384: Defining a Stable ABI (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Fri May 22 19:00:00 CEST 2009
- Previous message: [Python-Dev] PEP 384: Defining a Stable ABI
- Next message: [Python-Dev] PEP 384: a request for PyType_Slot
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Jim Jewett <jimjjewett gmail.com> writes:
> The accessor macros to these fields (PyREFCNT, PyTYPE, PySIZE) > are also available to applications. There have been several experiments in memory management, ranging from not bothering to change the refcount on permanent objects like None, to proxying objects across multiple threads or processes.
These experiments don't seem to have been very successful, have they? Besides, Py_TYPE is a fundamental property of every PyObject.
On the other hand, I think Py_SIZE should be discouraged in favour of the type-specific variants (PyString_GET_SIZE, etc.), since some types have their own way of (ab)using the size field.
I also believe (but don't remember for sure) that some of the proposed Unicode (or String?) optimizations changed the memory layout a bit.
The one Unicode optimization I know of, in http://bugs.python.org/issue1943, is suspended because of Marc-Andre's opposition. In any case, it doesn't touch the fundamental PyObject layout.
Regards
Antoine.
- Previous message: [Python-Dev] PEP 384: Defining a Stable ABI
- Next message: [Python-Dev] PEP 384: a request for PyType_Slot
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]