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