summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-07-14 23:13:24 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-07-14 23:13:24 (GMT)
commitecf4fdad50da72f6fcd4324436d0cf3f98053c12 (patch)
tree530a73a777e724001e87519782ebdf9268d13eeb
parenta7878b77dcddf365452b53b223324a2f67d9354d (diff)
downloadcpython-ecf4fdad50da72f6fcd4324436d0cf3f98053c12.zip
cpython-ecf4fdad50da72f6fcd4324436d0cf3f98053c12.tar.gz
cpython-ecf4fdad50da72f6fcd4324436d0cf3f98053c12.tar.bz2
Py_BuildValue("C") supports non-BMP characters on narrow build
Py_BuildValue("C") doesn't have to check the code point, PyUnicode_FromOrdinal() checks its input and now supports non-BMP characters (range U+10000-U+10FFFF).
-rw-r--r--Python/modsupport.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c
index 85b0d66..08f5065 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -292,11 +292,6 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
case 'C':
{
int i = va_arg(*p_va, int);
- if (i < 0 || i > PyUnicode_GetMax()) {
- PyErr_SetString(PyExc_OverflowError,
- "%c arg not in range(0x110000)");
- return NULL;
- }
return PyUnicode_FromOrdinal(i);
}