SHARE
TWEET

Untitled

a guest Feb 18th, 2020 106 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. static PyObject *
  2. unicodedata_UCD_east_asian_width_impl(PyObject *self, int chr)
  3. /*[clinic end generated code: output=484e8537d9ee8197 input=c4854798aab026e0]*/
  4. {
  5.     int index;
  6.     Py_UCS4 c = (Py_UCS4)chr;
  7.     index = (int) _getrecord_ex(c)->east_asian_width;
  8.     if (self && UCD_Check(self)) {
  9.         const change_record *old = get_old_record(self, c);
  10.         if (old->category_changed == 0)
  11.             index = 0; /* unassigned */
  12.         else if (old->east_asian_width_changed != 0xFF)
  13.             index = old->east_asian_width_changed;
  14.     }
  15.     return PyUnicode_FromString(_PyUnicode_EastAsianWidthNames[index]);
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top