mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Unicode 9.0.0
Not completely mechanical since support for East Asian Width changes—emoji codepoints became Wide—had to be added to unicodedata.
This commit is contained in:
parent
7ec64562b2
commit
6775231597
10 changed files with 26910 additions and 25252 deletions
|
@ -45,6 +45,7 @@ typedef struct change_record {
|
|||
const unsigned char category_changed;
|
||||
const unsigned char decimal_changed;
|
||||
const unsigned char mirrored_changed;
|
||||
const unsigned char east_asian_width_changed;
|
||||
const double numeric_changed;
|
||||
} change_record;
|
||||
|
||||
|
@ -375,6 +376,8 @@ unicodedata_UCD_east_asian_width_impl(PyObject *self, int chr)
|
|||
const change_record *old = get_old_record(self, c);
|
||||
if (old->category_changed == 0)
|
||||
index = 0; /* unassigned */
|
||||
else if (old->east_asian_width_changed != 0xFF)
|
||||
index = old->east_asian_width_changed;
|
||||
}
|
||||
return PyUnicode_FromString(_PyUnicode_EastAsianWidthNames[index]);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
45876
Modules/unicodename_db.h
45876
Modules/unicodename_db.h
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue