summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2019-06-07 11:08:55 +0200
committerNoel Power <npower@samba.org>2019-06-24 17:24:27 +0000
commit75d87b29f11a1dacb37ccc1b10f8d034063ef5ba (patch)
tree36d0c1dd0964908ba82351e5ca0e6163a9208672 /source4/param
parent3fa00d435045e6faeb92f5379684f118b131c92c (diff)
downloadsamba-75d87b29f11a1dacb37ccc1b10f8d034063ef5ba.tar.gz
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 <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/pyparam.c4
1 files changed, 2 insertions, 2 deletions
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)