1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

py3: Remove #define IsPy3Bytes PyBytes_Check

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>
This commit is contained in:
Andrew Bartlett 2020-03-15 10:40:46 +13:00 committed by Noel Power
parent 5c1867ba45
commit 675ab9d6ae
2 changed files with 1 additions and 3 deletions

View File

@ -62,8 +62,6 @@
* will work as expected in python2 & python3
*/
#define IsPy3Bytes PyBytes_Check
#define IsPy3BytesOrString(pystr) \
(PyUnicode_Check(pystr) || PyBytes_Check(pystr))

View File

@ -102,7 +102,7 @@ static int py_GUID_init(PyObject *self, PyObject *args, PyObject *kwargs)
return -1;
}
if (!IsPy3Bytes(str)) {
if (!PyBytes_Check(str)) {
guid_val.data =
discard_const_p(uint8_t,
PyUnicode_AsUTF8AndSize(str, &_size));