[Python-Dev] Use C extensions compiled in release mode on a Python compiled in debug mode (original) (raw)
Nathaniel Smith njs at pobox.com
Mon Apr 29 20:43:35 EDT 2019
- Previous message (by thread): [Python-Dev] Use C extensions compiled in release mode on a Python compiled in debug mode
- Next message (by thread): [Python-Dev] Use C extensions compiled in release mode on a Python compiled in debug mode
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Apr 29, 2019 at 5:01 PM Neil Schemenauer <nas-python at arctrix.com> wrote:
As far as I understand, we have a similar problem already for gc.getobjects() because those static type objects don't have a PyGCHead. My 2-cent proposal for fixing things in the long term would be to introduce a function like PyTypeReady that returns a pointer to the new type. The argument to it would be what is the current static type structure. The function would copy things from the static type structure into a newly allocated type structure.
I doubt you'll be able to get rid of static types entirely, due to the usual issues with C API breakage. And I'm guessing that static types make up such a tiny fraction of the address space that merely tweaking the percent up or down won't affect performance.
But your proposed new API would make it way easier to migrate existing code to the stable ABI.
-n
-- Nathaniel J. Smith -- https://vorpus.org
- Previous message (by thread): [Python-Dev] Use C extensions compiled in release mode on a Python compiled in debug mode
- Next message (by thread): [Python-Dev] Use C extensions compiled in release mode on a Python compiled in debug mode
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]