mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-06 09:50:28 +00:00
all tests pass in MODE=dbg
This commit is contained in:
parent
2231c966d8
commit
81c6b43e00
2 changed files with 8 additions and 1 deletions
7
third_party/python/Python/bltinmodule.c
vendored
7
third_party/python/Python/bltinmodule.c
vendored
|
@ -348,6 +348,13 @@ builtin___build_class__(PyObject *self, PyObject **args, Py_ssize_t nargs,
|
|||
Py_DECREF(bases);
|
||||
return NULL;
|
||||
}
|
||||
if (!PyMapping_Check(ns)) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"%.200s.__prepare__() must return a mapping, not %.200s",
|
||||
isclass ? ((PyTypeObject *)meta)->tp_name : "<metaclass>",
|
||||
Py_TYPE(ns)->tp_name);
|
||||
goto error;
|
||||
}
|
||||
cell = PyEval_EvalCodeEx(PyFunction_GET_CODE(func), PyFunction_GET_GLOBALS(func), ns,
|
||||
NULL, 0, NULL, 0, NULL, 0, NULL,
|
||||
PyFunction_GET_CLOSURE(func));
|
||||
|
|
2
third_party/python/Python/getargs.c
vendored
2
third_party/python/Python/getargs.c
vendored
|
@ -1789,7 +1789,7 @@ parser_init(struct _PyArg_Parser *parser)
|
|||
PyObject *kwtuple;
|
||||
|
||||
assert(parser->format != NULL);
|
||||
assert(parser->kwargs != NULL);
|
||||
assert(parser->keywords != NULL);
|
||||
if (parser->kwtuple != NULL) {
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue