Core and Builtins
-----------------
+- Issue #2221: Corrected a SystemError "error return without exception set",
+ when the code executed by exec() raises an exception, and sys.stdout.flush()
+ also raises an error.
+
- Bug #2565: The repr() of type objects now calls them 'class',
not 'type' - whether they are builtin types or not.
static void initmain(void);
static void initsite(void);
static int initstdio(void);
+static void flush_io(void);
static PyObject *run_mod(mod_ty, const char *, PyObject *, PyObject *,
PyCompilerFlags *, PyArena *);
static PyObject *run_pyc_file(FILE *, const char *, PyObject *, PyObject *,
d = PyModule_GetDict(m);
v = run_mod(mod, filename, d, d, flags, arena);
PyArena_Free(arena);
+ flush_io();
if (v == NULL) {
PyErr_Print();
return -1;
v = PyRun_FileExFlags(fp, filename, Py_file_input, d, d,
closeit, flags);
}
+ flush_io();
if (v == NULL) {
PyErr_Print();
ret = -1;
return NULL;
v = PyEval_EvalCode(co, globals, locals);
Py_DECREF(co);
- flush_io();
return v;
}
if (v && flags)
flags->cf_flags |= (co->co_flags & PyCF_MASK);
Py_DECREF(co);
- flush_io();
return v;
}