From ad3d3f2f3f19833f59fd7e9ec59e1714e0986e08 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 28 Feb 2001 17:47:12 +0000 Subject: 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(). --- Include/pyerrors.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Include/pyerrors.h') diff --git a/Include/pyerrors.h b/Include/pyerrors.h index c8c3d82311..7d8ed8466c 100644 --- a/Include/pyerrors.h +++ b/Include/pyerrors.h @@ -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 -- cgit v1.2.1