Pay off more technical debt

This makes breaking changes to add underscores to many non-standard
function names provided by the c library. MODE=tiny is now tinier and
we now use smaller locks that are better for tiny apps in this mode.
Some headers have been renamed to be in the same folder as the build
package, so it'll be easier to know which build dependency is needed.
Certain old misguided interfaces have been removed. Intel intrinsics
headers are now listed in libc/isystem (but not in the amalgamation)
to help further improve open source compatibility. Header complexity
has also been reduced. Lastly, more shell scripts are now available.
This commit is contained in:
Justine Tunney 2022-09-12 23:10:38 -07:00
parent b69f3d2488
commit 6f7d0cb1c3
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
960 changed files with 4072 additions and 4873 deletions

View file

@ -5,8 +5,8 @@
https://docs.python.org/3/license.html │
*/
#define PY_SSIZE_T_CLEAN
#include "libc/intrin/bits.h"
#include "libc/fmt/fmt.h"
#include "libc/intrin/bits.h"
#include "libc/nexgen32e/kompressor.h"
#include "third_party/python/Include/floatobject.h"
#include "third_party/python/Include/import.h"
@ -405,7 +405,7 @@ unicodedata_UCD_decomposition_impl(PyObject *self, int chr)
/* high byte is number of hex bytes (usually one or two), low byte
is prefix code (from*/
count = bextra(_PyUnicode_Decomp, index, _PyUnicode_DecompBits) >> 8;
count = _bextra(_PyUnicode_Decomp, index, _PyUnicode_DecompBits) >> 8;
/* XXX: could allocate the PyString up front instead
(strlen(prefix) + 5 * count + 1 bytes) */
@ -413,7 +413,7 @@ unicodedata_UCD_decomposition_impl(PyObject *self, int chr)
/* Based on how index is calculated above and _PyUnicode_Decomp is
generated from Tools/unicode/makeunicodedata.py, it should not be
possible to overflow _PyUnicode_DecompPrefix. */
prefix_index = bextra(_PyUnicode_Decomp, index, _PyUnicode_DecompBits) & 255;
prefix_index = _bextra(_PyUnicode_Decomp, index, _PyUnicode_DecompBits) & 255;
assert(prefix_index < Py_ARRAY_LENGTH(_PyUnicode_DecompPrefix));
/* copy prefix */
@ -425,8 +425,8 @@ unicodedata_UCD_decomposition_impl(PyObject *self, int chr)
decomp[i++] = ' ';
assert(i < sizeof(decomp));
PyOS_snprintf(decomp + i, sizeof(decomp) - i, "%04X",
bextra(_PyUnicode_Decomp, ++index,
_PyUnicode_DecompBits));
_bextra(_PyUnicode_Decomp, ++index,
_PyUnicode_DecompBits));
i += strlen(decomp + i);
}
return PyUnicode_FromStringAndSize(decomp, i);