comparison 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
comparison
equal deleted inserted replaced
18297:932903c7d054 18298:982163c4e9d2
531 /* concatenating string here */ 531 /* concatenating string here */
532 "\n\ 532 "\n\
533 Static objects:\n\ 533 Static objects:\n\
534 \n\ 534 \n\
535 maxint -- the largest supported integer (the smallest is -maxint-1)\n\ 535 maxint -- the largest supported integer (the smallest is -maxint-1)\n\
536 maxunicode -- the largest supported character\n\
536 builtin_module_names -- tuple of module names built into this intepreter\n\ 537 builtin_module_names -- tuple of module names built into this intepreter\n\
537 version -- the version of this interpreter as a string\n\ 538 version -- the version of this interpreter as a string\n\
538 version_info -- version information as a tuple\n\ 539 version_info -- version information as a tuple\n\
539 hexversion -- version information encoded as a single integer\n\ 540 hexversion -- version information encoded as a single integer\n\
540 copyright -- copyright notice pertaining to this interpreter\n\ 541 copyright -- copyright notice pertaining to this interpreter\n\
640 PyDict_SetItemString(sysdict, "exec_prefix", 641 PyDict_SetItemString(sysdict, "exec_prefix",
641 v = PyString_FromString(Py_GetExecPrefix())); 642 v = PyString_FromString(Py_GetExecPrefix()));
642 Py_XDECREF(v); 643 Py_XDECREF(v);
643 PyDict_SetItemString(sysdict, "maxint", 644 PyDict_SetItemString(sysdict, "maxint",
644 v = PyInt_FromLong(PyInt_GetMax())); 645 v = PyInt_FromLong(PyInt_GetMax()));
646 Py_XDECREF(v);
647 PyDict_SetItemString(sysdict, "maxunicode",
648 v = PyInt_FromLong(PyUnicode_GetMax()));
645 Py_XDECREF(v); 649 Py_XDECREF(v);
646 PyDict_SetItemString(sysdict, "builtin_module_names", 650 PyDict_SetItemString(sysdict, "builtin_module_names",
647 v = list_builtin_module_names()); 651 v = list_builtin_module_names());
648 Py_XDECREF(v); 652 Py_XDECREF(v);
649 { 653 {