summaryrefslogtreecommitdiff
path: root/lib/tdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2020-03-15 10:36:59 +1300
committerNoel Power <npower@samba.org>2020-03-23 19:12:43 +0000
commit5c1867ba459c2eff0dfc99c92200aecc2d44df59 (patch)
treeb4d32c7bdfe1b79a715f66fd4eec328c5c7f5404 /lib/tdb
parent4764e8b4c7e459f6aa5861d26ffaec3a3026d77f (diff)
downloadsamba-5c1867ba459c2eff0dfc99c92200aecc2d44df59.tar.gz
py3: Remove #define PyInt_FromLong PyLong_FromLong
This allows us to end the use of Python 2/3 compatability macros. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power
Diffstat (limited to 'lib/tdb')
-rw-r--r--lib/tdb/pytdb.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/tdb/pytdb.c b/lib/tdb/pytdb.c
index d00f3172f71..5ff1ef83117 100644
--- a/lib/tdb/pytdb.c
+++ b/lib/tdb/pytdb.c
@@ -32,7 +32,6 @@
#include <tdb.h>
#if PY_MAJOR_VERSION >= 3
-#define PyInt_FromLong PyLong_FromLong
#define Py_TPFLAGS_HAVE_ITER 0
#endif
@@ -547,7 +546,7 @@ static PyMethodDef tdb_object_methods[] = {
static PyObject *obj_get_hash_size(PyTdbObject *self, void *closure)
{
PyErr_TDB_RAISE_IF_CLOSED(self);
- return PyInt_FromLong(tdb_hash_size(self->ctx));
+ return PyLong_FromLong(tdb_hash_size(self->ctx));
}
static int obj_set_max_dead(PyTdbObject *self, PyObject *max_dead, void *closure)
@@ -562,19 +561,19 @@ static int obj_set_max_dead(PyTdbObject *self, PyObject *max_dead, void *closure
static PyObject *obj_get_map_size(PyTdbObject *self, void *closure)
{
PyErr_TDB_RAISE_IF_CLOSED(self);
- return PyInt_FromLong(tdb_map_size(self->ctx));
+ return PyLong_FromLong(tdb_map_size(self->ctx));
}
static PyObject *obj_get_freelist_size(PyTdbObject *self, void *closure)
{
PyErr_TDB_RAISE_IF_CLOSED(self);
- return PyInt_FromLong(tdb_freelist_size(self->ctx));
+ return PyLong_FromLong(tdb_freelist_size(self->ctx));
}
static PyObject *obj_get_flags(PyTdbObject *self, void *closure)
{
PyErr_TDB_RAISE_IF_CLOSED(self);
- return PyInt_FromLong(tdb_get_flags(self->ctx));
+ return PyLong_FromLong(tdb_get_flags(self->ctx));
}
static PyObject *obj_get_filename(PyTdbObject *self, void *closure)
@@ -586,7 +585,7 @@ static PyObject *obj_get_filename(PyTdbObject *self, void *closure)
static PyObject *obj_get_seqnum(PyTdbObject *self, void *closure)
{
PyErr_TDB_RAISE_IF_CLOSED(self);
- return PyInt_FromLong(tdb_get_seqnum(self->ctx));
+ return PyLong_FromLong(tdb_get_seqnum(self->ctx));
}
static PyObject *obj_get_text(PyTdbObject *self, void *closure)