Closed rossburton closed 2 years ago
So Python expects the length, or *arg4
in the %typemap(out) (const void *)
typemap, to be Py_ssize_t
. The API uses int
so it needs to be cast.
Made it work. Define PY_SSIZE_T_CLEAN, cast the ints to Py_ssize_t. Patch incoming once I've cleared it internally.
Thanks for your patch, that's merged now, so I'm closing.
PY_SSIZE_T_CLEAN
is now mandatory in 3.10, so the module needs to define that symbol and change the length type fromint
tossize_t
in all#
formats passed to egPy_BuildValue
.I'm new to Swig so trying to figure out how to make this actually happen...