1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/python
Noel Power aea433ee0c python: Add compatability helpers to determine if type is really bytes
py3compat has PyBytes_Check macro which evalates to PyString_Check in
python2. To help switch behaviour based on whether you are dealing
with the bytes type the following macros have been added.

IsPy3Bytes
IsPy3BytesOrString

IsPy3Bytes will evaluate to false in python2 and will return the
expected result in python3. IsPy3BytesOrString will test for string
type alone in python2 or bytes and string in python3.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-03-23 07:28:25 +01:00
..
examples python/examples/winreg: two variable name typos on a single line 2017-03-10 07:31:10 +01:00
samba s4/selftest: Add simple python netbios test python2 only for the moment 2018-03-23 07:28:25 +01:00
samba_external
modules.c python: Port simple libpython module to Python 3 compatible form 2017-06-13 22:46:14 +02:00
modules.h
py3compat.h python: Add compatability helpers to determine if type is really bytes 2018-03-23 07:28:25 +01:00
pyglue.c pyglue: Add function to generate a random byte string 2017-12-18 00:10:16 +01:00
wscript python: Port simple libpython module to Python 3 compatible form 2017-06-13 22:46:14 +02:00