Skip to content

Commit

Permalink
[mypyc] Fix wheel build for cp313-win (#18560)
Browse files Browse the repository at this point in the history
Sync `pythoncapi_compat.h` with latest fix from
python/pythoncapi-compat#137.
Ref: #18535 (comment)
  • Loading branch information
cdce8p authored Jan 28, 2025
1 parent c08719d commit f49a1cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mypyc/lib-rt/pythoncapi_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit f49a1cb

Please sign in to comment.