From 8d0fe227ddfbf94eb8792cd4b3356a9b5c74affc Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 22 Apr 2010 13:02:56 +0200 Subject: [PATCH] added PyUnicode_FromOrdinal() to unicode.pxd --- Cython/Includes/cpython/unicode.pxd | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Cython/Includes/cpython/unicode.pxd b/Cython/Includes/cpython/unicode.pxd index 053c0b3f..debb37ef 100644 --- a/Cython/Includes/cpython/unicode.pxd +++ b/Cython/Includes/cpython/unicode.pxd @@ -89,6 +89,13 @@ cdef extern from *: # when u is NULL. object PyUnicode_FromUnicode(Py_UNICODE *u, Py_ssize_t size) + # Create a Unicode Object from the given Unicode code point ordinal. + # + # The ordinal must be in range(0x10000) on narrow Python builds + # (UCS2), and range(0x110000) on wide builds (UCS4). A ValueError + # is raised in case it is not. + PyObject* PyUnicode_FromOrdinal(int ordinal) + # Return a read-only pointer to the Unicode object's internal # Py_UNICODE buffer, NULL if unicode is not a Unicode object. Py_UNICODE* PyUnicode_AsUnicode(object o) except NULL -- 2.26.2