summaryrefslogtreecommitdiff
path: root/lib/tdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2020-03-15 10:32:11 +1300
committerNoel Power <npower@samba.org>2020-03-23 19:12:43 +0000
commit4764e8b4c7e459f6aa5861d26ffaec3a3026d77f (patch)
treea9627bbb9177daf4fb2e33686e81c10abecf4759 /lib/tdb
parentcc79726d95108e3d8ef612a863c2f9fffd768636 (diff)
downloadsamba-4764e8b4c7e459f6aa5861d26ffaec3a3026d77f.tar.gz
py3: Remove #define PyInt_AsLong PyLong_AsLong
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 <npower@samba.org>
Diffstat (limited to 'lib/tdb')
-rw-r--r--lib/tdb/pytdb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/tdb/pytdb.c b/lib/tdb/pytdb.c
index 7211d466a71..d00f3172f71 100644
--- a/lib/tdb/pytdb.c
+++ b/lib/tdb/pytdb.c
@@ -33,7 +33,6 @@
#if PY_MAJOR_VERSION >= 3
#define PyInt_FromLong PyLong_FromLong
-#define PyInt_AsLong PyLong_AsLong
#define Py_TPFLAGS_HAVE_ITER 0
#endif
@@ -556,7 +555,7 @@ static int obj_set_max_dead(PyTdbObject *self, PyObject *max_dead, void *closure
PyErr_TDB_RAISE_RETURN_MINUS_1_IF_CLOSED(self);
if (!PyLong_Check(max_dead))
return -1;
- tdb_set_max_dead(self->ctx, PyInt_AsLong(max_dead));
+ tdb_set_max_dead(self->ctx, PyLong_AsLong(max_dead));
return 0;
}