Blame SOURCES/0005-PyInt_FromLong-doesn-t-exist-in-python3-so-always-us.patch

4b950d
From 273377f924599a4d7358770664467a22a81249ef Mon Sep 17 00:00:00 2001
4b950d
From: Chris Lumens <clumens@redhat.com>
4b950d
Date: Wed, 14 Jan 2015 11:40:42 -0500
4b950d
Subject: [PATCH 5/7] PyInt_FromLong doesn't exist in python3, so always use
4b950d
 PyLong_FromLong.
4b950d
4b950d
---
4b950d
 src/_pedmodule.c | 8 ++++----
4b950d
 1 file changed, 4 insertions(+), 4 deletions(-)
4b950d
4b950d
diff --git a/src/_pedmodule.c b/src/_pedmodule.c
4b950d
index 7f02193..a048d91 100644
4b950d
--- a/src/_pedmodule.c
4b950d
+++ b/src/_pedmodule.c
4b950d
@@ -403,8 +403,8 @@ static PedExceptionOption partedExnHandler(PedException *e) {
4b950d
                     PyObject *args, *retval;
4b950d
 
4b950d
                     args = PyTuple_New(3);
4b950d
-                    PyTuple_SetItem(args, 0, PyInt_FromLong(e->type));
4b950d
-                    PyTuple_SetItem(args, 1, PyInt_FromLong(e->options));
4b950d
+                    PyTuple_SetItem(args, 0, PyLong_FromLong(e->type));
4b950d
+                    PyTuple_SetItem(args, 1, PyLong_FromLong(e->options));
4b950d
                     PyTuple_SetItem(args, 2, PyUnicode_FromString(e->message));
4b950d
 
4b950d
                     retval = PyObject_CallObject(exn_handler, NULL);
4b950d
@@ -441,8 +441,8 @@ static PedExceptionOption partedExnHandler(PedException *e) {
4b950d
                 PyObject *args, *retval;
4b950d
 
4b950d
                 args = PyTuple_New(3);
4b950d
-                PyTuple_SetItem(args, 0, PyInt_FromLong(e->type));
4b950d
-                PyTuple_SetItem(args, 1, PyInt_FromLong(e->options));
4b950d
+                PyTuple_SetItem(args, 0, PyLong_FromLong(e->type));
4b950d
+                PyTuple_SetItem(args, 1, PyLong_FromLong(e->options));
4b950d
                 PyTuple_SetItem(args, 2, PyUnicode_FromString(e->message));
4b950d
 
4b950d
                 retval = PyObject_CallObject(exn_handler, NULL);
4b950d
-- 
4b950d
2.4.0
4b950d