From bb8b931385ba9df4e01f7dd3ce4575d49f60efdf Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 26 Jun 2022 13:04:43 +0200 Subject: gh-90005: Port _ctypes to PY_STDLIB_MOD (GH-32229) Co-authored-by: Erlend Egeberg Aasland Automerge-Triggered-By: GH:tiran --- Modules/Setup.stdlib.in | 2 +- Modules/_ctypes/callproc.c | 3 +++ Modules/_ctypes/malloc_closure.c | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'Modules') diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in index 2730030a15..a199aefc51 100644 --- a/Modules/Setup.stdlib.in +++ b/Modules/Setup.stdlib.in @@ -136,7 +136,7 @@ # # needs -lffi and -ldl -#@MODULE__CTYPES_TRUE@_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c +@MODULE__CTYPES_TRUE@_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c @MODULE__CTYPES_MALLOC_CLOSURE@ # needs -lncurses, -lncursesw or -lcurses, sometimes -ltermcap #@MODULE__CURSES_TRUE@_curses _cursesmodule.c diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index 3fab9ad0c1..fa1dfac6c7 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -54,6 +54,9 @@ */ +#ifndef Py_BUILD_CORE_BUILTIN +# define Py_BUILD_CORE_MODULE 1 +#endif #define NEEDS_PY_IDENTIFIER #include "Python.h" diff --git a/Modules/_ctypes/malloc_closure.c b/Modules/_ctypes/malloc_closure.c index 38edc90e70..d47153f1d7 100644 --- a/Modules/_ctypes/malloc_closure.c +++ b/Modules/_ctypes/malloc_closure.c @@ -1,3 +1,6 @@ +#ifndef Py_BUILD_CORE_BUILTIN +# define Py_BUILD_CORE_MODULE 1 +#endif #include #include #ifdef MS_WIN32 -- cgit v1.2.1