Author: Amaury Forgeot d'Arc <[email protected]>
Branch: 
Changeset: r52817:16b015b252c3
Date: 2012-02-23 00:25 +0100
http://bitbucket.org/pypy/pypy/changeset/16b015b252c3/

Log:    cpyext: add PyUnicode_GetMax()

diff --git a/pypy/module/cpyext/unicodeobject.py 
b/pypy/module/cpyext/unicodeobject.py
--- a/pypy/module/cpyext/unicodeobject.py
+++ b/pypy/module/cpyext/unicodeobject.py
@@ -155,6 +155,11 @@
     except KeyError:
         return -1.0
 
+@cpython_api([], Py_UNICODE, error=CANNOT_FAIL)
+def PyUnicode_GetMax(space):
+    """Get the maximum ordinal for a Unicode character."""
+    return unichr(runicode.MAXUNICODE)
+
 @cpython_api([PyObject], rffi.CCHARP, error=CANNOT_FAIL)
 def PyUnicode_AS_DATA(space, ref):
     """Return a pointer to the internal buffer of the object. o has to be a
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to