summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2014-02-13 13:08:36 +0200
committerPanu Matilainen <pmatilai@redhat.com>2014-09-05 14:45:03 +0300
commitddc7ff28e14064f57c6917e133a95e73f749cf41 (patch)
tree88f0f0978cd74157ac60a13a9cbe1bddc1e9c38c
parent2c6e0366ffc6bdbafbdf82df7fcedd975a361465 (diff)
downloadrpm-ddc7ff28e14064f57c6917e133a95e73f749cf41.tar.gz
Python 3 doesn't have nb_divide in PyNumberMethods
(cherry picked from commit 05740e1d67b972a7909c1950dca7bb2ec4e35a60)
-rw-r--r--python/rpmii-py.c2
-rw-r--r--python/rpmmi-py.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/python/rpmii-py.c b/python/rpmii-py.c
index d7713affd..d19d5dc10 100644
--- a/python/rpmii-py.c
+++ b/python/rpmii-py.c
@@ -88,7 +88,9 @@ static PyNumberMethods rpmii_as_number = {
0, /* nb_add */
0, /* nb_subtract */
0, /* nb_multiply */
+#if PY_MAJOR_VERSION < 3
0, /* nb_divide */
+#endif
0, /* nb_remainder */
0, /* nb_divmod */
0, /* nb_power */
diff --git a/python/rpmmi-py.c b/python/rpmmi-py.c
index 8e670ce02..e581b27cb 100644
--- a/python/rpmmi-py.c
+++ b/python/rpmmi-py.c
@@ -149,7 +149,9 @@ static PyNumberMethods rpmmi_as_number = {
0, /* nb_add */
0, /* nb_subtract */
0, /* nb_multiply */
+#if PY_MAJOR_VERSION < 3
0, /* nb_divide */
+#endif
0, /* nb_remainder */
0, /* nb_divmod */
0, /* nb_power */