mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-29 08:42:28 +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
4
third_party/python/Programs/python.c
vendored
4
third_party/python/Programs/python.c
vendored
|
@ -46,7 +46,7 @@ GetMember(const char *s, Py_ssize_t n, PyObject *o)
|
|||
if (v != Py_None && PyUnicode_Check(k)) {
|
||||
t = PyUnicode_AsUTF8AndSize(k, &m);
|
||||
printf("\r%`'.*s vs. %`'.*s\n", n, s, m, t);
|
||||
if (n == m && !memcmp(s, t, n)) {
|
||||
if (n == m && !memcasecmp(s, t, n)) {
|
||||
Py_INCREF(v);
|
||||
return v;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ TerminalComplete(const char *s, linenoiseCompletions *c, PyObject *o)
|
|||
for (n = strlen(s), i = 0; PyDict_Next(o, &i, &k, &v);) {
|
||||
if (v != Py_None && PyUnicode_Check(k)) {
|
||||
t = PyUnicode_AsUTF8AndSize(k, &m);
|
||||
if (m > n && !memcmp(t, s, n)) {
|
||||
if (m > n && !memcasecmp(t, s, n)) {
|
||||
c->cvec = realloc(c->cvec, ++c->len * sizeof(*c->cvec));
|
||||
c->cvec[c->len - 1] = strdup(t);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue