]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Properly escape preprocessor directives
authorMichael Schroeder <mls@suse.de>
Mon, 16 Nov 2020 14:11:14 +0000 (15:11 +0100)
committerMichael Schroeder <mls@suse.de>
Mon, 16 Nov 2020 14:11:14 +0000 (15:11 +0100)
Otherwise swig will process them instead of the compiler

Should have been in commit 170f8550b89c6c9e61b40e782cd75148825c2e89

bindings/solv.i

index 0a8389a25d025fbc3f0a77e01bca2e2a3898c20c..1882b1359150c712b4dc07cb50b400fff3fd3b70 100644 (file)
@@ -44,11 +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, &pybuf, &pysize);
-#else
+%#if PY_VERSION_HEX >= 0x03000000
+    res = PyBytes_AsStringAndSize($input, (char **)&pybuf, &pysize);
+%#else
     res = PyObject_AsReadBuffer($input, &pybuf, &pysize);
-#endif
+%#endif
     if (res < 0) {
       %argument_fail(res, "BinaryBlob", $symname, $argnum);
     } else {