[issue41188] Prepare CPython for opaque PyObject structure.

2020-07-07 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
nosy: +ronaldoussoren

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41188] Prepare CPython for opaque PyObject structure.

2020-07-01 Thread William Pickard


Change by William Pickard :


--
keywords: +patch
pull_requests: +20415
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21262

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41188] Prepare CPython for opaque PyObject structure.

2020-07-01 Thread William Pickard


New submission from William Pickard :

The goal of issue 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:
1) 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"

2) 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).

--
components: C API, Interpreter Core
messages: 372775
nosy: WildCard65, vstinner
priority: normal
severity: normal
status: open
title: Prepare CPython for opaque PyObject structure.
type: enhancement
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com