This is an automated email from the git hooks/post-receive script.
nsoffer pushed a commit to branch master
in repository sanlock.
commit b227f1d3b63ca8d247554ff2d7cabe2121e9ff3a
Author: Amit Bawer <abawer(a)redhat.com>
AuthorDate: Sat May 18 19:26:16 2019 +0300
python: Use Py_BuildValue("i", ...) to create py integers
Preserve compatibility for both Py3 and Py2.
- Py2: will construct new PyInt
- Py3: will construct new PyLong
Both Py versions will build and pass tests at this point.
---
python/sanlock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/sanlock.c b/python/sanlock.c
index 6477afe..b412b6a 100644
--- a/python/sanlock.c
+++ b/python/sanlock.c
@@ -273,7 +273,7 @@ py_register(PyObject *self __unused, PyObject *args)
return NULL;
}
- return PyInt_FromLong(sanlockfd);
+ return Py_BuildValue("i", sanlockfd);
}
/* get_alignment */
@@ -306,7 +306,7 @@ py_get_alignment(PyObject *self __unused, PyObject *args)
return NULL;
}
- return PyInt_FromLong(rv);
+ return Py_BuildValue("i", rv);
}
/* init_lockspace */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by thread