[Python-checkins] python/dist/src/Include unicodeobject.h,2.36.10.1,2.36.10.2

mwh@users.sourceforge.net mwh@users.sourceforge.net
2002年10月07日 05:32:58 -0700


Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv32278/Include
Modified Files:
 Tag: release22-maint
	unicodeobject.h 
Log Message:
Backport:
2002年08月11日 12:23:04 lemburg Python/bltinmodule.c 2.262
2002年08月11日 12:23:04 lemburg Objects/unicodeobject.c 2.162
2002年08月11日 12:23:03 lemburg Misc/NEWS 1.461
2002年08月11日 12:23:03 lemburg Lib/test/test_unicode.py 1.65
2002年08月11日 12:23:03 lemburg Include/unicodeobject.h 2.39
Add C API PyUnicode_FromOrdinal() which exposes unichr() at C level.
u'%c' will now raise a ValueError in case the argument is an
integer outside the valid range of Unicode code point ordinals.
Closes SF bug #593581.
Index: unicodeobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v
retrieving revision 2.36.10.1
retrieving revision 2.36.10.2
diff -C2 -d -r2.36.10.1 -r2.36.10.2
*** unicodeobject.h	22 Apr 2002 18:42:44 -0000	2.36.10.1
--- unicodeobject.h	7 Oct 2002 12:32:56 -0000	2.36.10.2
***************
*** 518,521 ****
--- 518,533 ----
 #endif
 
+ /* --- Unicode ordinals --------------------------------------------------- */
+ 
+ /* Create a Unicode Object from the given Unicode code point ordinal. 
+ 
+ The ordinal must be in range(0x10000) on narrow Python builds
+ (UCS2), and range(0x110000) on wide builds (UCS4). A ValueError is
+ raised in case it is not.
+ 
+ */
+ 
+ extern DL_IMPORT(PyObject*) PyUnicode_FromOrdinal(int ordinal);
+ 
 /* === Builtin Codecs ===================================================== 
 

AltStyle によって変換されたページ (->オリジナル) /