[Python-checkins] CVS: python/dist/src/Objects unicodectype.c,2.2,2.3

M.-A. Lemburg python-dev@python.org
Wed, 5 Jul 2000 02:49:02 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory slayer.i.sourceforge.net:/tmp/cvs-serv18055/Objects
Modified Files:
	unicodectype.c 
Log Message:
Added new lookup API which matches all alphabetic Unicode characters,
i.e the ones with category 'Ll','Lu','Lt','Lo','Lm'.
Index: unicodectype.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodectype.c,v
retrieving revision 2.2
retrieving revision 2.3
diff -C2 -r2.2 -r2.3
*** unicodectype.c	2000年04月11日 15:39:02	2.2
--- unicodectype.c	2000年07月05日 09:48:59	2.3
***************
*** 5015,5018 ****
--- 5015,10308 ----
 }
 
+ /* Returns 1 for Unicode characters having the category 'Ll', 'Lu', 'Lt',
+ 'Lo' or 'Lm', 0 otherwise. */
+ 
+ int _PyUnicode_IsAlpha(register const Py_UNICODE ch)
+ {
+ if (_PyUnicode_IsLowercase(ch) ||
+ 	_PyUnicode_IsUppercase(ch) ||
[...5277 lines suppressed...]
+ 	return 1;
+ default:
+ 	return 0;
+ }
+ }
+ 
 #else
 
***************
*** 5043,5046 ****
--- 10333,10341 ----
 {
 return towupper(ch);
+ }
+ 
+ int _PyUnicode_IsAlpha(register const Py_UNICODE ch)
+ {
+ return iswalpha(ch);
 }
 

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