You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prepare CPython for opaque PyObject structure. #85360
The goal of bpo-39573 is to make "PyObject" and opaque structure in the limited API.
To do that, a few mandatory changes will be required to CPython in order to allow for seamless implementation.
Namely:
User types need to get away from directly referencing PyObject.
This can be done by adding a new variable to "PyTypeObject" who's value is an offset into the object's pointer to the type's internal structure.
-- Example: 'PyType_Type.tp_obj_offset' would be the value of "sizeof(PyVarObject)".
-- For custom types with another base: The value would be calculated from the base's "tp_obj_offset" + "tp_basicsize"
Create a linkable static library to facility method calls requiring internal implementation.
This static library will be implementation defined, IE: using internal methods specific to the runtime that created it.
Public facing methods will use generic names for example, "PyObject_GetType" will get the object's ob_type (or whatever the target runtime calls it).
Activity
WildCard65 commentedon Jul 1, 2020
The goal of bpo-39573 is to make "PyObject" and opaque structure in the limited API.
To do that, a few mandatory changes will be required to CPython in order to allow for seamless implementation.
Namely:
User types need to get away from directly referencing PyObject.
-- Example: 'PyType_Type.tp_obj_offset' would be the value of "sizeof(PyVarObject)".
-- For custom types with another base: The value would be calculated from the base's "tp_obj_offset" + "tp_basicsize"
Create a linkable static library to facility method calls requiring internal implementation.
iritkatriel commentedon Jun 25, 2022
The PR was closed by the OP after a core dev requested changes. So I am assuming the project was abandoned and closing the issue as well.