summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-02-28 17:47:12 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-02-28 17:47:12 (GMT)
commitad3d3f2f3f19833f59fd7e9ec59e1714e0986e08 (patch)
tree3b1b99d9f5330c80768ceb14484050a3ff7162d7 /Include
parent5687ffe0c56a827b538589fc46e79dfacfd857f3 (diff)
downloadcpython-ad3d3f2f3f19833f59fd7e9ec59e1714e0986e08.zip
cpython-ad3d3f2f3f19833f59fd7e9ec59e1714e0986e08.tar.gz
cpython-ad3d3f2f3f19833f59fd7e9ec59e1714e0986e08.tar.bz2
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().
Diffstat (limited to 'Include')
-rw-r--r--Include/pyerrors.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index c8c3d82..7d8ed84 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