diff options
author | Andrew Bartlett <abartlet@samba.org> | 2020-03-15 10:36:59 +1300 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2020-03-23 19:12:43 +0000 |
commit | 5c1867ba459c2eff0dfc99c92200aecc2d44df59 (patch) | |
tree | b4d32c7bdfe1b79a715f66fd4eec328c5c7f5404 /lib/ldb | |
parent | 4764e8b4c7e459f6aa5861d26ffaec3a3026d77f (diff) | |
download | samba-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/ldb')
-rw-r--r-- | lib/ldb/pyldb.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index a6069be46a9..eb879b98984 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -85,7 +85,6 @@ static struct ldb_message_element *PyObject_AsMessageElement( static PyTypeObject PyLdbBytesType; #if PY_MAJOR_VERSION >= 3 -#define PyInt_FromLong PyLong_FromLong #define PYARG_STR_UNI "es" @@ -2541,7 +2540,7 @@ static PyObject *py_ldb_result_get_count(PyLdbResultObject *self, void *closure) return NULL; } size = PyList_Size(self->msgs); - return PyInt_FromLong(size); + return PyLong_FromLong(size); } static PyGetSetDef py_ldb_result_getset[] = { @@ -3080,7 +3079,7 @@ static PyObject *py_ldb_msg_element_get(PyLdbMessageElementObject *self, PyObjec static PyObject *py_ldb_msg_element_flags(PyLdbMessageElementObject *self, PyObject *args) { struct ldb_message_element *el = pyldb_MessageElement_AsMessageElement(self); - return PyInt_FromLong(el->flags); + return PyLong_FromLong(el->flags); } static PyObject *py_ldb_msg_element_set_flags(PyLdbMessageElementObject *self, PyObject *args) @@ -4204,7 +4203,7 @@ static PyObject *py_string_to_time(PyObject *module, PyObject *args) if (!PyArg_ParseTuple(args, "s", &str)) return NULL; - return PyInt_FromLong(ldb_string_to_time(str)); + return PyLong_FromLong(ldb_string_to_time(str)); } static PyObject *py_valid_attr_name(PyObject *self, PyObject *args) |