mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Get more Python tests passing (#141)
This commit is contained in:
parent
916f19eea1
commit
59e1c245d1
141 changed files with 3536 additions and 1203 deletions
8
third_party/python/Objects/longobject.c
vendored
8
third_party/python/Objects/longobject.c
vendored
|
@ -1604,7 +1604,7 @@ long_to_decimal_string_internal(PyObject *aa,
|
|||
digit *pout, *pin, rem, tenpow;
|
||||
int negative;
|
||||
int d;
|
||||
enum PyUnicode_Kind kind = -1;
|
||||
enum PyUnicode_Kind kind = 0;
|
||||
|
||||
a = (PyLongObject *)aa;
|
||||
if (a == NULL || !PyLong_Check(a)) {
|
||||
|
@ -1696,8 +1696,6 @@ long_to_decimal_string_internal(PyObject *aa,
|
|||
kind = PyUnicode_KIND(str);
|
||||
}
|
||||
|
||||
CHECK_NE(-1, kind); /* if this fails there's a serious bug upstream */
|
||||
|
||||
#define WRITE_DIGITS(p) \
|
||||
do { \
|
||||
/* pout[0] through pout[size-2] contribute exactly \
|
||||
|
@ -1796,7 +1794,7 @@ long_format_binary(PyObject *aa, int base, int alternate,
|
|||
PyObject *v = NULL;
|
||||
Py_ssize_t sz;
|
||||
Py_ssize_t size_a;
|
||||
enum PyUnicode_Kind kind = -1;
|
||||
enum PyUnicode_Kind kind = 0;
|
||||
int negative;
|
||||
int bits;
|
||||
|
||||
|
@ -1863,8 +1861,6 @@ long_format_binary(PyObject *aa, int base, int alternate,
|
|||
kind = PyUnicode_KIND(v);
|
||||
}
|
||||
|
||||
CHECK_NE(-1, kind); /* if this fails there's a serious bug upstream */
|
||||
|
||||
#define WRITE_DIGITS(p) \
|
||||
do { \
|
||||
if (size_a == 0) { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue