projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1866fc4
)
On Python 3, use macros to alias all usage of PyInt_ to PyLong_ equivalents
author
Panu Matilainen
<pmatilai@redhat.com>
Wed, 21 Oct 2009 10:21:01 +0000
(13:21 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Wed, 21 Oct 2009 10:21:01 +0000
(13:21 +0300)
- Python 3 unified PyInt with PyLong, the former no longer exists
- Based on a patch by David Malcolm
python/rpmsystem-py.h
patch
|
blob
|
history
diff --git
a/python/rpmsystem-py.h
b/python/rpmsystem-py.h
index
d4923ab
..
b27a410
100644
(file)
--- a/
python/rpmsystem-py.h
+++ b/
python/rpmsystem-py.h
@@
-33,4
+33,11
@@
typedef Py_ssize_t (*lenfunc)(PyObject *);
#define PyXBytes_AsString PyString_AsString
#endif
+/* For Python 3, use the PyLong type throughout in place of PyInt */
+#if PY_MAJOR_VERSION >= 3
+#define PyInt_Check PyLong_Check
+#define PyInt_AsLong PyLong_AsLong
+#define PyInt_FromLong PyLong_FromLong
+#endif
+
#endif /* H_SYSTEM_PYTHON */