Commit 2c2791a9 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Add stubs for raw_input() input() and cmp()

I think these are getting accessed but not used right now
parent 8eb4abc8
......@@ -990,6 +990,18 @@ Box* builtinIter(Box* obj, Box* sentinel) {
return r;
}
Box* rawInput(Box* prompt) {
Py_FatalError("unimplemented");
}
Box* input(Box* prompt) {
Py_FatalError("unimplemented");
}
Box* builtinCmp(Box* lhs, Box* rhs) {
Py_FatalError("unimplemented");
}
void setupBuiltins() {
builtins_module = createModule("__builtin__", "__builtin__");
......@@ -1195,5 +1207,14 @@ void setupBuiltins() {
"eval", new BoxedBuiltinFunctionOrMethod(boxRTFunction((void*)eval, UNKNOWN, 1, 0, false, false), "eval"));
builtins_module->giveAttr("callable",
new BoxedBuiltinFunctionOrMethod(boxRTFunction((void*)callable, UNKNOWN, 1), "callable"));
builtins_module->giveAttr(
"raw_input", new BoxedBuiltinFunctionOrMethod(boxRTFunction((void*)rawInput, UNKNOWN, 1, 1, false, false),
"raw_input", { NULL }));
builtins_module->giveAttr(
"input",
new BoxedBuiltinFunctionOrMethod(boxRTFunction((void*)input, UNKNOWN, 1, 1, false, false), "input", { NULL }));
builtins_module->giveAttr("cmp",
new BoxedBuiltinFunctionOrMethod(boxRTFunction((void*)builtinCmp, UNKNOWN, 2), "cmp"));
}
}
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