[Python-checkins] CVS: python/dist/src/Python sysmodule.c,2.86,2.87

Martin v. L?wis loewis@users.sourceforge.net
Tue, 26 Jun 2001 23:28:58 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv21016/Python

Modified Files:
	sysmodule.c 
Log Message:
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.


Index: sysmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v
retrieving revision 2.86
retrieving revision 2.87
diff -C2 -r2.86 -r2.87
*** sysmodule.c	2001/06/16 21:02:31	2.86
--- sysmodule.c	2001/06/27 06:28:56	2.87
***************
*** 534,537 ****
--- 534,538 ----
  \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\
***************
*** 643,646 ****
--- 644,650 ----
  	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",