py3: Remove #define PyInt_AsLong PyLong_AsLong
[samba.git] / libcli / nbt / pynbt.c
index 1148da7289dbf0cb60dfe823126292da25cbdc06..d9659e898d73fd1815fa977e2f9420875a295992 100644 (file)
@@ -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;
                        }