diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2015-05-23 21:46:45 +0200 |
---|---|---|
committer | Lukas Slebodnik <lslebodn@redhat.com> | 2015-09-30 15:00:26 +0200 |
commit | 0ffc58e2407f1756b0c09fe31ecd21a75e88e833 (patch) | |
tree | 18a2f1510ef40f44b0d9d60c7358fc6d4cb98405 | |
parent | 1ec5ef62d63937727187419b36549edacd98a271 (diff) | |
download | sssd-1-11.tar.gz sssd-1-11.tar.xz sssd-1-11.zip |
pysss_nss_idmap: Use wrapper for older pythonsssd-1-11
PyUnicode_FromString -> sss_python_unicode_from_string
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | src/python/pysss_nss_idmap.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 9d972f901..3f0f0c00d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2181,7 +2181,8 @@ pysss_murmur_la_LDFLAGS = \ -module pysss_nss_idmap_la_SOURCES = \ - src/python/pysss_nss_idmap.c + src/python/pysss_nss_idmap.c \ + src/util/sss_python.c pysss_nss_idmap_la_CFLAGS = \ $(AM_CFLAGS) \ $(PYTHON_CFLAGS) diff --git a/src/python/pysss_nss_idmap.c b/src/python/pysss_nss_idmap.c index 0870b0da6..ad4b4a3f7 100644 --- a/src/python/pysss_nss_idmap.c +++ b/src/python/pysss_nss_idmap.c @@ -95,7 +95,7 @@ static int do_getsidbyname(PyObject *py_result, PyObject *py_name) ret = sss_nss_getsidbyname(name, &sid, &id_type); if (ret == 0) { ret = add_dict(py_result, py_name, PyString_FromString(SSS_SID_KEY), - PyUnicode_FromString(sid), PyInt_FromLong(id_type)); + sss_python_unicode_from_string(sid), PyInt_FromLong(id_type)); } free(sid); @@ -117,7 +117,7 @@ static int do_getnamebysid(PyObject *py_result, PyObject *py_sid) ret = sss_nss_getnamebysid(sid, &name, &id_type); if (ret == 0) { ret = add_dict(py_result, py_sid, PyString_FromString(SSS_NAME_KEY), - PyUnicode_FromString(name), PyInt_FromLong(id_type)); + sss_python_unicode_from_string(name), PyInt_FromLong(id_type)); } free(name); @@ -156,7 +156,7 @@ static int do_getsidbyid(PyObject *py_result, PyObject *py_id) ret = sss_nss_getsidbyid((uint32_t) id, &sid, &id_type); if (ret == 0) { ret = add_dict(py_result, py_id, PyString_FromString(SSS_SID_KEY), - PyUnicode_FromString(sid), PyInt_FromLong(id_type)); + sss_python_unicode_from_string(sid), PyInt_FromLong(id_type)); } free(sid); |