diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-12-23 14:46:59 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-12-23 14:46:59 +0900 |
commit | de92b8ea19562961f973960c0f8f5aec7f6d9c75 (patch) | |
tree | 4d5cf84b1adf5ba72a35b68d28514e202f18b83f /bindings/solv.i | |
parent | 99023ce80ad7daa0f6462861dac71e17aac694b8 (diff) | |
download | libsolv-de92b8ea19562961f973960c0f8f5aec7f6d9c75.tar.gz libsolv-de92b8ea19562961f973960c0f8f5aec7f6d9c75.tar.bz2 libsolv-de92b8ea19562961f973960c0f8f5aec7f6d9c75.zip |
Imported Upstream version 0.7.17upstream/0.7.17
Diffstat (limited to 'bindings/solv.i')
-rw-r--r-- | bindings/solv.i | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bindings/solv.i b/bindings/solv.i index 48d3f1f..1882b13 100644 --- a/bindings/solv.i +++ b/bindings/solv.i @@ -44,7 +44,11 @@ typedef struct { #if defined(SWIGPYTHON) const void *pybuf = 0; Py_ssize_t pysize = 0; +%#if PY_VERSION_HEX >= 0x03000000 + res = PyBytes_AsStringAndSize($input, (char **)&pybuf, &pysize); +%#else res = PyObject_AsReadBuffer($input, &pybuf, &pysize); +%#endif if (res < 0) { %argument_fail(res, "BinaryBlob", $symname, $argnum); } else { |