Permalink
Browse files

Disuse deprecated PyUnicode_FromObject.

  • Loading branch information...
1 parent 0fd7737 commit 8ef9d6dc65d855d40d0af274c8dd09d4cdabec89 @stefanholek committed Sep 9, 2012
Showing with 1 addition and 9 deletions.
  1. +1 −9 rl/unicode.c
View
@@ -49,15 +49,7 @@ PyUnicode_INDEX(const char *text, Py_ssize_t index)
PyObject *
PyUnicode_ENCODE(PyObject *text)
{
- PyObject *u;
- PyObject *b;
-
- u = PyUnicode_FromObject(text);
- if (u == NULL)
- return NULL;
- b = PyUnicode_AsEncodedString(u, _ENCODING, _ERRORS);
- Py_DECREF(u);
- return b;
+ return PyUnicode_AsEncodedString(text, _ENCODING, _ERRORS);
}

0 comments on commit 8ef9d6d

Please sign in to comment.