You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to defining PY_SSIZE_T_CLEAN, you also need to ensure you use Py_ssize_t rather than int in any calls that use the # formats. So, py3c shouldn't simply define PY_SSIZE_T_CLEAN for you -- that would be inviting data corruption.
Hello, I ran into this issue after upgrading from Python 3.9 to Python 3.11 recently.
Apparently the MACRO PY_SSIZE_T_CLEAN must be defined in
py3c.h
before includingpython.h
https://docs.python.org/3/c-api/arg.html#strings-and-buffers
Otherwise it leads to
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
The text was updated successfully, but these errors were encountered: