[Python-3000] string C API
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun Sep 17 01:17:35 CEST 2006
Martin v. Löwis wrote:
> Just try implementing comparison some time. You can end up implementing
> the same algorithm six times at least, once for each pair (1,1), (1,2),
> (1,4), (2,2), (2,4), (4,4).
#define UnicodeStringComparisonFunction(TYPE1, TYPE2) \
/* code to implement it here */
UnicodeStringComparisonFunction(UCS1, UCS1)
UnicodeStringComparisonFunction(UCS1, UCS2)
UnicodeStringComparisonFunction(UCS1, UCS4)
UnicodeStringComparisonFunction(UCS2, UCS2)
UnicodeStringComparisonFunction(UCS2, UCS4)
UnicodeStringComparisonFunction(UCS4, UCS4)
--
Greg
More information about the Python-3000
mailing list