Created
July 21, 2017 05:24
-
-
Save bhavishyagopesh/91017a33b93a92a7269dd6838e186672 to your computer and use it in GitHub Desktop.
run_mod definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static PyObject * | |
run_mod(mod_ty mod, const char *filename, PyObject *globals, PyObject *locals, | |
PyCompilerFlags *flags, PyArena *arena) | |
{ | |
PyCodeObject *co; | |
PyObject *v; | |
co = PyAST_Compile(mod, filename, flags, arena); | |
if (co == NULL) | |
return NULL; | |
v = PyEval_EvalCode(co, globals, locals); | |
Py_DECREF(co); | |
return v; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment