diff options
author | Andrew Bartlett <abartlet@samba.org> | 2019-06-07 10:39:11 +0200 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2019-06-24 17:24:27 +0000 |
commit | f498c819664e9df658651d39f616f5b4d62b4750 (patch) | |
tree | b4849a8c497c3b38027af5c444ea3828418f19a2 /libcli | |
parent | 559dd2d25a644239902753e842b808bac1a0b439 (diff) | |
download | samba-f498c819664e9df658651d39f616f5b4d62b4750.tar.gz |
py3: Remove PyStr_Check() compatability macro
We no longer need Samba to be py2/py3 compatible so we choose to return to the standard
function names.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
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 2ae3ecfe8a7..4134c4344a6 100644 --- a/libcli/nbt/pynbt.c +++ b/libcli/nbt/pynbt.c @@ -57,7 +57,7 @@ static PyObject *py_nbt_node_init(PyTypeObject *self, PyObject *args, PyObject * static bool PyObject_AsDestinationTuple(PyObject *obj, const char **dest_addr, uint16_t *dest_port) { - if (PyStr_Check(obj) || PyUnicode_Check(obj)) { + if (PyUnicode_Check(obj) || PyUnicode_Check(obj)) { *dest_addr = PyStr_AsString(obj); *dest_port = NBT_NAME_SERVICE_PORT; return true; @@ -69,7 +69,7 @@ static bool PyObject_AsDestinationTuple(PyObject *obj, const char **dest_addr, u return false; } - if (!(PyStr_Check(PyTuple_GetItem(obj, 0)) || PyUnicode_Check(PyTuple_GetItem(obj, 0)))) { + if (!(PyUnicode_Check(PyTuple_GetItem(obj, 0)) || PyUnicode_Check(PyTuple_GetItem(obj, 0)))) { PyErr_SetString(PyExc_TypeError, "Destination tuple first element not string"); return false; } @@ -126,7 +126,7 @@ static bool PyObject_AsNBTName(PyObject *obj, struct nbt_name_socket *name_socke } } - if (PyStr_Check(obj) || PyUnicode_Check(obj)) { + if (PyUnicode_Check(obj) || PyUnicode_Check(obj)) { /* FIXME: Parse string to be able to interpret things like RHONWYN<02> ? */ name->name = PyStr_AsString(obj); if (name->name == NULL) { |