From 75d87b29f11a1dacb37ccc1b10f8d034063ef5ba Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 7 Jun 2019 11:08:55 +0200 Subject: py3: Remove PyStr_FromFormat() 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 Reviewed-by: Noel Power --- source4/param/pyparam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/param') diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index cf7423ddec3..fc5965e6245 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -100,7 +100,7 @@ static PyObject *py_lp_ctx_get_helper(struct loadparm_context *lp_ctx, const cha /* construct and return the right type of python object */ switch (parm->type) { case P_CHAR: - return PyStr_FromFormat("%c", *(char *)parm_ptr); + return PyUnicode_FromFormat("%c", *(char *)parm_ptr); case P_STRING: case P_USTRING: return PyUnicode_FromString(*(char **)parm_ptr); @@ -355,7 +355,7 @@ static PyObject *py_lp_log_level(PyObject *self, PyObject *unused) static PyObject *py_samdb_url(PyObject *self, PyObject *unused) { struct loadparm_context *lp_ctx = PyLoadparmContext_AsLoadparmContext(self); - return PyStr_FromFormat("tdb://%s/sam.ldb", lpcfg_private_dir(lp_ctx)); + return PyUnicode_FromFormat("tdb://%s/sam.ldb", lpcfg_private_dir(lp_ctx)); } static PyObject *py_cache_path(PyObject *self, PyObject *args) -- cgit v1.2.1