Lines Matching defs:globals
629 PythonDictionary globals(PyInitialValue::Empty);
631 llvm::Error error = globals.SetItem("__builtins__", builtins);
635 PyObject *o = PyRun_String("lambda x : x", Py_eval_input, globals.get(),
636 globals.get());
645 PyObject *o = PyRun_String("lambda x,y=0: x", Py_eval_input, globals.get(),
646 globals.get());
656 globals.get(), globals.get());
665 PyObject *o = PyRun_String("lambda x,y,*a: x", Py_eval_input, globals.get(),
666 globals.get());
677 globals.get(), globals.get());
716 PyRun_String(script, Py_file_input, globals.get(), globals.get());
720 auto bar_bound = As<PythonCallable>(globals.GetItem("bar_bound"));
726 auto bar_unbound = As<PythonCallable>(globals.GetItem("bar_unbound"));
732 auto bar_class = As<PythonCallable>(globals.GetItem("bar_class"));
738 auto bar_static = As<PythonCallable>(globals.GetItem("bar_static"));
744 auto obj = As<PythonCallable>(globals.GetItem("obj"));
750 auto oldstyle = As<PythonCallable>(globals.GetItem("OldStyle"));
756 auto newstyle = As<PythonCallable>(globals.GetItem("NewStyle"));
839 PythonDictionary globals(PyInitialValue::Empty);
841 auto x = As<long long>(runStringOneLine("40 + 2", globals, globals));
845 Expected<PythonObject> r = runStringOneLine("n = 42", globals, globals);
847 auto y = As<long long>(globals.GetItem("n"));
857 r = runStringMultiLine(script, globals, globals);
859 auto g = As<std::string>(globals.GetItem("g"));