diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2015-02-09 19:38:42 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-02-25 08:38:29 +0100 |
commit | e4796d5ed8e08be7f3767e12753389b18a2ce9f0 (patch) | |
tree | 7eed094d964d601a7cd1d6b79849c51ccf39b684 /src/python/pyhbac.c | |
parent | 03e9d9d6c1d8768a6f70217bababd82de29bc770 (diff) | |
download | sssd-e4796d5ed8e08be7f3767e12753389b18a2ce9f0.tar.gz sssd-e4796d5ed8e08be7f3767e12753389b18a2ce9f0.tar.xz sssd-e4796d5ed8e08be7f3767e12753389b18a2ce9f0.zip |
UTIL: Remove python wrapper sss_python_unicode_from_string
The function PyUnicode_FromString is available in python >= 2.6
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
Diffstat (limited to 'src/python/pyhbac.c')
-rw-r--r-- | src/python/pyhbac.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/python/pyhbac.c b/src/python/pyhbac.c index 05845be86..fca476c56 100644 --- a/src/python/pyhbac.c +++ b/src/python/pyhbac.c @@ -493,7 +493,7 @@ HbacRuleElement_repr(HbacRuleElement *self) uint32_t category; PyObject *o, *format, *args; - format = sss_python_unicode_from_string("<category %lu names [%s] groups [%s]>"); + format = PyUnicode_FromString("<category %lu names [%s] groups [%s]>"); if (format == NULL) { return NULL; } @@ -651,7 +651,7 @@ HbacRule_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return NULL; } - self->name = sss_python_unicode_from_string(""); + self->name = PyUnicode_FromString(""); if (self->name == NULL) { Py_DECREF(self); PyErr_NoMemory(); @@ -869,7 +869,7 @@ HbacRule_repr(HbacRuleObject *self) PyObject *srchosts_repr; PyObject *o, *format, *args; - format = sss_python_unicode_from_string("<name %s enabled %d " + format = PyUnicode_FromString("<name %s enabled %d " "users %s services %s " "targethosts %s srchosts %s>"); if (format == NULL) { @@ -1149,7 +1149,7 @@ HbacRequestElement_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return NULL; } - self->name = sss_python_unicode_from_string(""); + self->name = PyUnicode_FromString(""); if (self->name == NULL) { PyErr_NoMemory(); Py_DECREF(self); @@ -1291,7 +1291,7 @@ HbacRequestElement_repr(HbacRequestElement *self) char *strgroups; PyObject *o, *format, *args; - format = sss_python_unicode_from_string("<name %s groups [%s]>"); + format = PyUnicode_FromString("<name %s groups [%s]>"); if (format == NULL) { return NULL; } @@ -1609,7 +1609,7 @@ py_hbac_evaluate(HbacRequest *self, PyObject *args) eres = hbac_evaluate(rules, hbac_req, &info); switch (eres) { case HBAC_EVAL_ALLOW: - self->rule_name = sss_python_unicode_from_string(info->rule_name); + self->rule_name = PyUnicode_FromString(info->rule_name); if (!self->rule_name) { PyErr_NoMemory(); goto fail; @@ -1662,7 +1662,7 @@ HbacRequest_repr(HbacRequest *self) PyObject *srchost_repr; PyObject *o, *format, *args; - format = sss_python_unicode_from_string("<user %s service %s " + format = PyUnicode_FromString("<user %s service %s " "targethost %s srchost %s>"); if (format == NULL) { return NULL; @@ -1853,7 +1853,7 @@ py_hbac_result_string(PyObject *module, PyObject *args) return Py_None; } - return sss_python_unicode_from_string(str); + return PyUnicode_FromString(str); } PyDoc_STRVAR(py_hbac_error_string__doc__, @@ -1877,7 +1877,7 @@ py_hbac_error_string(PyObject *module, PyObject *args) return Py_None; } - return sss_python_unicode_from_string(str); + return PyUnicode_FromString(str); } static PyMethodDef pyhbac_module_methods[] = { |