py_compat: Fix Python 2.7 compilation error

This code never actually gets compiled in Python 3

[skip ci]
This commit is contained in:
rdb 2024-10-30 21:51:56 +01:00
parent c2de5c306f
commit ff91f127bf
1 changed files with 1 additions and 5 deletions

View File

@ -33,11 +33,7 @@ size_t PyLongOrInt_AsSize_t(PyObject *vv) {
size_t bytes;
int one = 1;
int res = _PyLong_AsByteArray((PyLongObject *)vv, (unsigned char *)&bytes,
SIZEOF_SIZE_T, (int)*(unsigned char*)&one, 0,
#if PY_VERSION_HEX >= 0x030d0000
, 1 // with_exceptions
#endif
);
SIZEOF_SIZE_T, (int)*(unsigned char*)&one, 0);
if (res < 0) {
return (size_t)res;