Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static PyObject *
- unicodedata_UCD_east_asian_width_impl(PyObject *self, int chr)
- /*[clinic end generated code: output=484e8537d9ee8197 input=c4854798aab026e0]*/
- {
- int index;
- Py_UCS4 c = (Py_UCS4)chr;
- index = (int) _getrecord_ex(c)->east_asian_width;
- if (self && UCD_Check(self)) {
- 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]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement