1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

py3: Remove PyStr_AsString() 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>
This commit is contained in:
Andrew Bartlett
2019-06-07 11:16:25 +02:00
committed by Noel Power
parent d9d9463fd3
commit f178daa854
10 changed files with 35 additions and 37 deletions

View File

@ -538,7 +538,7 @@ static PyObject *py_lp_ctx_getitem(PyObject *self, PyObject *name)
PyErr_SetString(PyExc_TypeError, "Only string subscripts are supported");
return NULL;
}
service = lpcfg_service(PyLoadparmContext_AsLoadparmContext(self), PyStr_AsString(name));
service = lpcfg_service(PyLoadparmContext_AsLoadparmContext(self), PyUnicode_AsUTF8(name));
if (service == NULL) {
PyErr_SetString(PyExc_KeyError, "No such section");
return NULL;