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 /lib/tevent | |
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 'lib/tevent')
-rw-r--r-- | lib/tevent/pytevent.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c index a73141bf87d..50252836b69 100644 --- a/lib/tevent/pytevent.c +++ b/lib/tevent/pytevent.c @@ -27,12 +27,10 @@ #include <tevent.h> #if PY_MAJOR_VERSION >= 3 -#define PyStr_Check PyUnicode_Check #define PyStr_FromString PyUnicode_FromString #define PyStr_AsUTF8 PyUnicode_AsUTF8 #define PyInt_FromLong PyLong_FromLong #else -#define PyStr_Check PyString_Check #define PyStr_FromString PyString_FromString #define PyStr_AsUTF8 PyString_AsString #endif @@ -191,7 +189,7 @@ static PyObject *py_register_backend(PyObject *self, PyObject *args) return NULL; } - if (!(PyStr_Check(name) || PyUnicode_Check(name))) { + if (!(PyUnicode_Check(name) || PyUnicode_Check(name))) { PyErr_SetNone(PyExc_TypeError); Py_DECREF(name); return NULL; |