mirror of
https://github.com/python/cpython.git
synced 2025-10-07 07:31:46 +00:00
Improve SyntaxErrors for bad future statements. Set file and location
for errors raised in future.c. Move some helper functions from compile.c to errors.c and make them API functions: PyErr_SyntaxLocation() and PyErr_ProgramText().
This commit is contained in:
parent
5687ffe0c5
commit
ad3d3f2f3f
4 changed files with 113 additions and 94 deletions
|
@ -98,6 +98,10 @@ extern DL_IMPORT(int) PyErr_Warn(PyObject *, char *);
|
|||
/* In sigcheck.c or signalmodule.c */
|
||||
extern DL_IMPORT(int) PyErr_CheckSignals(void);
|
||||
extern DL_IMPORT(void) PyErr_SetInterrupt(void);
|
||||
|
||||
/* Support for adding program text to SyntaxErrors */
|
||||
extern DL_IMPORT(void) PyErr_SyntaxLocation(char *, int);
|
||||
extern DL_IMPORT(PyObject *) PyErr_ProgramText(char *, int);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue