From e4796d5ed8e08be7f3767e12753389b18a2ce9f0 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Mon, 9 Feb 2015 19:38:42 +0100 Subject: UTIL: Remove python wrapper sss_python_unicode_from_string The function PyUnicode_FromString is available in python >= 2.6 Reviewed-by: Stephen Gallagher --- src/util/sss_python.c | 10 ---------- src/util/sss_python.h | 3 --- 2 files changed, 13 deletions(-) (limited to 'src/util') diff --git a/src/util/sss_python.c b/src/util/sss_python.c index ba78bf968..560effc26 100644 --- a/src/util/sss_python.c +++ b/src/util/sss_python.c @@ -21,16 +21,6 @@ #include "src/util/sss_python.h" #include "config.h" -PyObject * -sss_python_unicode_from_string(const char *u) -{ -#ifdef HAVE_PYUNICODE_FROMSTRING - return PyUnicode_FromString(u); -#else - return PyUnicode_DecodeUTF8(u, strlen(u), NULL); -#endif -} - PyObject * sss_exception_with_doc(char *name, char *doc, PyObject *base, PyObject *dict) { diff --git a/src/util/sss_python.h b/src/util/sss_python.h index 5521aa5cf..7e2bac336 100644 --- a/src/util/sss_python.h +++ b/src/util/sss_python.h @@ -25,9 +25,6 @@ #define PYNUMBER_ASLONG(what) PyInt_AsLong(what) #endif -/* Unicode compatibility */ -PyObject *sss_python_unicode_from_string(const char *u); - /* Exceptions compatibility */ PyObject * sss_exception_with_doc(char *name, char *doc, PyObject *base, PyObject *dict); -- cgit