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:
parent
5c1867ba45
commit
675ab9d6ae
@ -62,8 +62,6 @@
|
||||
* will work as expected in python2 & python3
|
||||
*/
|
||||
|
||||
#define IsPy3Bytes PyBytes_Check
|
||||
|
||||
#define IsPy3BytesOrString(pystr) \
|
||||
(PyUnicode_Check(pystr) || PyBytes_Check(pystr))
|
||||
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user