summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2014-10-10 11:27:15 +0200
committerStefan Behnel <stefan_ml@behnel.de>2014-10-10 11:27:15 +0200
commit047b779aa1efe21801698fd3c603f718228c48c2 (patch)
treefc1a92f129f188670ba3e33597fe519868c72fb9
parent147f614dde703c8ea0859ad1052fdc3a39502dc7 (diff)
downloadcython-047b779aa1efe21801698fd3c603f718228c48c2.tar.gz
extend PyUnicode C-API declarations
--HG-- extra : transplant_source : %1F%BE%A2%C2X%2C%AA%3F%AD%7D%07%A7q6%180%A38%CB%5D
-rw-r--r--Cython/Includes/cpython/unicode.pxd15
1 files changed, 15 insertions, 0 deletions
diff --git a/Cython/Includes/cpython/unicode.pxd b/Cython/Includes/cpython/unicode.pxd
index a8370e311..e522a32a8 100644
--- a/Cython/Includes/cpython/unicode.pxd
+++ b/Cython/Includes/cpython/unicode.pxd
@@ -525,3 +525,18 @@ cdef extern from *:
#
# New in version 3.3.
bytes PyUnicode_EncodeCodePage(int code_page, object unicode, const char *errors)
+
+
+# Py_UCS4 helpers (new in CPython 3.3)
+
+ # These utility functions work on strings of Py_UCS4 characters and
+ # otherwise behave like the C standard library functions with the same name.
+
+ size_t Py_UCS4_strlen(const Py_UCS4 *u)
+ Py_UCS4* Py_UCS4_strcpy(Py_UCS4 *s1, const Py_UCS4 *s2)
+ Py_UCS4* Py_UCS4_strncpy(Py_UCS4 *s1, const Py_UCS4 *s2, size_t n)
+ Py_UCS4* Py_UCS4_strcat(Py_UCS4 *s1, const Py_UCS4 *s2)
+ int Py_UCS4_strcmp(const Py_UCS4 *s1, const Py_UCS4 *s2)
+ int Py_UCS4_strncmp(const Py_UCS4 *s1, const Py_UCS4 *s2, size_t n)
+ Py_UCS4* Py_UCS4_strchr(const Py_UCS4 *s, Py_UCS4 c)
+ Py_UCS4* Py_UCS4_strrchr(const Py_UCS4 *s, Py_UCS4 c)