mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Apply fixes and speedups
This commit is contained in:
parent
7521bf9e73
commit
725f4d79f6
36 changed files with 682 additions and 334 deletions
|
@ -4,6 +4,7 @@
|
|||
│ Python 3 │
|
||||
│ https://docs.python.org/3/license.html │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/bits/likely.h"
|
||||
#include "third_party/python/Include/pyerrors.h"
|
||||
#include "third_party/python/Include/pymem.h"
|
||||
|
@ -114,10 +115,10 @@ _PyUnicode_NfcNfkc(PyObject *self, PyObject *input, int k)
|
|||
}
|
||||
index = f * UNIDATA_TOTAL_LAST + l;
|
||||
index1 = _PyUnicode_CompIndex[index >> _PyUnicode_CompShift];
|
||||
code = _PyUnicode_Bextr(_PyUnicode_CompData,
|
||||
(index1 << _PyUnicode_CompShift)+
|
||||
(index & ((1 << _PyUnicode_CompShift) - 1)),
|
||||
_PyUnicode_CompDataBits);
|
||||
code = bextra(_PyUnicode_CompData,
|
||||
(index1 << _PyUnicode_CompShift)+
|
||||
(index & ((1 << _PyUnicode_CompShift) - 1)),
|
||||
_PyUnicode_CompDataBits);
|
||||
if (code == 0)
|
||||
goto not_combinable;
|
||||
/* Replace the original character. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue