From 17ce52b6c2248faad6bfc55d90bc41695307e9d6 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 28 Jan 2025 14:32:08 +0100 Subject: [PATCH] [mypyc] Fix wheel build for cp313-win --- mypyc/lib-rt/pythoncapi_compat.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mypyc/lib-rt/pythoncapi_compat.h b/mypyc/lib-rt/pythoncapi_compat.h index 4d2884622f1f..e534c1cbb7cc 100644 --- a/mypyc/lib-rt/pythoncapi_compat.h +++ b/mypyc/lib-rt/pythoncapi_compat.h @@ -1939,7 +1939,8 @@ PyLongWriter_Finish(PyLongWriter *writer) static inline FILE* Py_fopen(PyObject *path, const char *mode) { #if 0x030400A2 <= PY_VERSION_HEX && !defined(PYPY_VERSION) - extern FILE* _Py_fopen_obj(PyObject *path, const char *mode); + PyAPI_FUNC(FILE*) _Py_fopen_obj(PyObject *path, const char *mode); + return _Py_fopen_obj(path, mode); #else FILE *f; @@ -2109,7 +2110,8 @@ PyConfig_Get(const char *name) return Py_NewRef(value); } - extern const PyConfig* _Py_GetConfig(void); + PyAPI_FUNC(const PyConfig*) _Py_GetConfig(void); + const PyConfig *config = _Py_GetConfig(); void *member = (char *)config + spec->offset; switch (spec->type) {