diff options
author | Andrew Bartlett <abartlet@samba.org> | 2020-03-15 10:32:11 +1300 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2020-03-23 19:12:43 +0000 |
commit | 4764e8b4c7e459f6aa5861d26ffaec3a3026d77f (patch) | |
tree | a9627bbb9177daf4fb2e33686e81c10abecf4759 /libcli | |
parent | cc79726d95108e3d8ef612a863c2f9fffd768636 (diff) | |
download | samba-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 'libcli')
-rw-r--r-- | libcli/nbt/pynbt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcli/nbt/pynbt.c b/libcli/nbt/pynbt.c index 1148da7289d..d9659e898d7 100644 --- a/libcli/nbt/pynbt.c +++ b/libcli/nbt/pynbt.c @@ -80,7 +80,7 @@ static bool PyObject_AsDestinationTuple(PyObject *obj, const char **dest_addr, u *dest_port = NBT_NAME_SERVICE_PORT; return true; } else if (PyLong_Check(PyTuple_GetItem(obj, 1))) { - *dest_port = PyInt_AsLong(PyTuple_GetItem(obj, 1)); + *dest_port = PyLong_AsLong(PyTuple_GetItem(obj, 1)); return true; } else { PyErr_SetString(PyExc_TypeError, "Destination tuple second element not a port"); @@ -100,7 +100,7 @@ static bool PyObject_AsNBTName(PyObject *obj, struct nbt_name_socket *name_socke if (name->name == NULL) { goto err; } - name->type = PyInt_AsLong(PyTuple_GetItem(obj, 1)); + name->type = PyLong_AsLong(PyTuple_GetItem(obj, 1)); if (name->type == -1 && PyErr_Occurred()) { goto err; } @@ -115,7 +115,7 @@ static bool PyObject_AsNBTName(PyObject *obj, struct nbt_name_socket *name_socke if (name->scope == NULL) { goto err; } - name->type = PyInt_AsLong(PyTuple_GetItem(obj, 2)); + name->type = PyLong_AsLong(PyTuple_GetItem(obj, 2)); if (name->type == -1 && PyErr_Occurred()) { goto err; } |