blob: f6a3a47ba29189a962a11dce73d47e77b180326b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
--- pybindgen_unfix/pybindgen/pytypeobject.py 2015-04-13 12:35:28.815857809 +0200
+++ pybindgen/pybindgen/pytypeobject.py 2015-04-13 12:58:13.561729000 +0200
@@ -293,7 +293,11 @@
Py_XDECREF(py_result);
return -1;
}
+#if PY_MAJOR_VERSION >= 3
result = PyLong_AsSsize_t(py_result);
+#else
+ result = PyInt_AsSsize_t(py_result);
+#endif
Py_DECREF(py_result);
return result;
}
@@ -323,7 +319,11 @@
Py_XDECREF(py_result);
return -1;
}
+#if PY_MAJOR_VERSION >= 3
result = PyLong_AsSsize_t(py_result);
+#else
+ result = PyInt_AsSsize_t(py_result);
+#endif
Py_DECREF(py_result);
return result;
}
|