We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 958c839 commit 170f855Copy full SHA for 170f855
1 file changed
bindings/solv.i
@@ -44,7 +44,11 @@ typedef struct {
44
#if defined(SWIGPYTHON)
45
const void *pybuf = 0;
46
Py_ssize_t pysize = 0;
47
+#if PY_VERSION_HEX >= 0x03000000
48
+ res = PyBytes_AsStringAndSize($input, &pybuf, &pysize);
49
+#else
50
res = PyObject_AsReadBuffer($input, &pybuf, &pysize);
51
+#endif
52
if (res < 0) {
53
%argument_fail(res, "BinaryBlob", $symname, $argnum);
54
} else {
0 commit comments