Commit eb3e468e authored by Boxiang Sun's avatar Boxiang Sun

let PyEval_GetBuiltins return attrwrapper

parent 2b881d16
......@@ -1462,7 +1462,7 @@ extern "C" BORROWED(PyObject*) PyEval_GetGlobals(void) noexcept {
}
extern "C" BORROWED(PyObject*) PyEval_GetBuiltins(void) noexcept {
return builtins_module;
return builtins_module->getAttrWrapper();
}
Box* ellipsisRepr(Box* self) {
......
......@@ -2990,9 +2990,7 @@ static PyObject* object_new(PyTypeObject* type, PyObject* args, PyObject* kwds)
builtins = PyEval_GetBuiltins();
if (builtins == NULL)
goto error;
// Pyston change: builtins is a module not a dict
// sorted = PyDict_GetItemString(builtins, "sorted");
sorted = builtins->getattr(autoDecref(internStringMortal("sorted")));
sorted = PyDict_GetItemString(builtins, "sorted");
if (sorted == NULL)
goto error;
sorted_methods = PyObject_CallFunctionObjArgs(sorted, abstract_methods, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment