gh-110805: Allow the repl to show source code and complete tracebacks (#110775)

This commit is contained in:
Pablo Galindo Salgado 2023-10-13 11:25:37 +02:00 • committed by GitHub
parent 898f531996
commit e1d8c65e1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 191 additions and 19 deletions

View file

@ -233,6 +233,7 @@ struct _is {
/* the initial PyInterpreterState.threads.head */
PyThreadState _initial_thread;
Py_ssize_t _interactive_src_count;
};

View file

@ -58,7 +58,17 @@ extern struct _mod* _PyParser_ASTFromFile(
PyCompilerFlags *flags,
int *errcode,
PyArena *arena);
extern struct _mod* _PyParser_InteractiveASTFromFile(
FILE *fp,
PyObject *filename_ob,
const char *enc,
int mode,
const char *ps1,
const char *ps2,
PyCompilerFlags *flags,
int *errcode,
PyObject **interactive_src,
PyArena *arena);
#ifdef __cplusplus
}