Skip to content

[3.13] gh-117142: Slightly hacky fix for memory leak of StgInfo (GH-119424) - #119468

Merged
encukou merged 1 commit into
python:3.13from
miss-islington:backport-a192547-3.13
May 30, 2024
Merged

encukou merged 1 commit into
python:3.13from
miss-islington:backport-a192547-3.13

Conversation

@miss-islington

@miss-islington miss-islington commented May 23, 2024 •

Copy link
Copy Markdown
Contributor

Add a funciton that inlines PyObject_GetTypeData and skips
type-checking, so it doesn't need access to the CType_Type object.
This will break if the memory layout changes, but should
be an acceptable solution to enable ctypes in subinterpreters in
Python 3.13.

Mark _ctypes as safe for multiple interpreters

(cherry picked from commit a192547)

Co-authored-by: Petr Viktorin encukou@gmail.com
Co-authored-by: neonene 53406459+neonene@users.noreply.github.com

…nGH-119424)

Add a funciton that inlines PyObject_GetTypeData and skips
type-checking, so it doesn't need access to the CType_Type object.
This will break if the memory layout changes, but should
be an acceptable solution to enable ctypes in subinterpreters in
Python 3.13.

Mark _ctypes as safe for multiple interpreters

(cherry picked from commit a192547)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants