mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merged revisions 66362 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r66362 | martin.v.loewis | 2008-09-10 15:38:12 +0200 (Mi, 10 Sep 2008) | 3 lines Issue #3811: The Unicode database was updated to 5.1. Reviewed by Fredrik Lundh and Marc-Andre Lemburg. ........
This commit is contained in:
parent
1009d39187
commit
93cbca33f2
8 changed files with 19135 additions and 15886 deletions
|
@ -22,6 +22,7 @@
|
|||
#define XID_START_MASK 0x100
|
||||
#define XID_CONTINUE_MASK 0x200
|
||||
#define PRINTABLE_MASK 0x400
|
||||
#define NODELTA_MASK 0x800
|
||||
|
||||
typedef struct {
|
||||
const Py_UNICODE upper;
|
||||
|
@ -85,6 +86,9 @@ Py_UNICODE _PyUnicode_ToTitlecase(register Py_UNICODE ch)
|
|||
else
|
||||
delta = ctype->upper;
|
||||
|
||||
if (ctype->flags & NODELTA_MASK)
|
||||
return delta;
|
||||
|
||||
if (delta >= 32768)
|
||||
delta -= 65536;
|
||||
|
||||
|
@ -767,6 +771,8 @@ Py_UNICODE _PyUnicode_ToUppercase(Py_UNICODE ch)
|
|||
{
|
||||
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||
int delta = ctype->upper;
|
||||
if (ctype->flags & NODELTA_MASK)
|
||||
return delta;
|
||||
if (delta >= 32768)
|
||||
delta -= 65536;
|
||||
return ch + delta;
|
||||
|
@ -779,6 +785,8 @@ Py_UNICODE _PyUnicode_ToLowercase(Py_UNICODE ch)
|
|||
{
|
||||
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||
int delta = ctype->lower;
|
||||
if (ctype->flags & NODELTA_MASK)
|
||||
return delta;
|
||||
if (delta >= 32768)
|
||||
delta -= 65536;
|
||||
return ch + delta;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue