python: Add new compat PYARG_STR_UNI format
authorNoel Power <noel.power@suse.com>
Tue, 11 Dec 2018 15:18:10 +0000 (15:18 +0000)
committerDouglas Bagnall <dbagnall@samba.org>
Sat, 12 Jan 2019 23:40:26 +0000 (00:40 +0100)
commit253af8b85450c2830a442084e98734ca338c1b2f
tree210a9655386ef57648f285b1ec0636e67367b03d
parent5232979de8394944dccae848207aae65c1a65ec1
python: Add new compat PYARG_STR_UNI format

In python2 PYARG_STR_UNI evaluates to et which allows str type
(e.g bytes) pass through unencoded and accepts unicode objects
encoded as utf8
In python3 PYARG_STR_UNI evaluates to es which allows str type
encoded as named/specified encoding

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/py3compat.h