Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 18298:982163c4e9d2 legacy-trunk
Encode surrogates in UTF-8 even for a wide Py_UNICODE.
Implement sys.maxunicode.
Explicitly wrap around upper/lower computations for wide Py_UNICODE.
When decoding large characters with UTF-8, represent expected test
results using the \U notation.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Wed, 27 Jun 2001 06:28:56 +0000 |
| parents | 4cb34314bd97 |
| children | e427afb5637f |
line wrap: on
line diff
--- a/Python/sysmodule.c Tue Jun 26 23:12:25 2001 +0000 +++ b/Python/sysmodule.c Wed Jun 27 06:28:56 2001 +0000 @@ -533,6 +533,7 @@ Static objects:\n\ \n\ maxint -- the largest supported integer (the smallest is -maxint-1)\n\ +maxunicode -- the largest supported character\n\ builtin_module_names -- tuple of module names built into this intepreter\n\ version -- the version of this interpreter as a string\n\ version_info -- version information as a tuple\n\ @@ -643,6 +644,9 @@ PyDict_SetItemString(sysdict, "maxint", v = PyInt_FromLong(PyInt_GetMax())); Py_XDECREF(v); + PyDict_SetItemString(sysdict, "maxunicode", + v = PyInt_FromLong(PyUnicode_GetMax())); + Py_XDECREF(v); PyDict_SetItemString(sysdict, "builtin_module_names", v = list_builtin_module_names()); Py_XDECREF(v);
