diff Python/errors.c @ 26601:cc05c2c8660e legacy-trunk

Constify filenames and scripts. Fixes #651362.
author Martin v. Löwis <martin@v.loewis.de>
date Wed, 11 Dec 2002 14:04:59 +0000
parents 2fa559fb6ec5
children e07b21ea3c45
line wrap: on
line diff
--- a/Python/errors.c	Wed Dec 11 13:54:20 2002 +0000
+++ b/Python/errors.c	Wed Dec 11 14:04:59 2002 +0000
@@ -637,9 +637,9 @@
 
 /* Warning with explicit origin */
 int
-PyErr_WarnExplicit(PyObject *category, char *message,
-		   char *filename, int lineno,
-		   char *module, PyObject *registry)
+PyErr_WarnExplicit(PyObject *category, const char *message,
+		   const char *filename, int lineno,
+		   const char *module, PyObject *registry)
 {
 	PyObject *mod, *dict, *func = NULL;
 
@@ -679,7 +679,7 @@
    to make printing of exceptions believe it is a syntax error. */
 
 void
-PyErr_SyntaxLocation(char *filename, int lineno)
+PyErr_SyntaxLocation(const char *filename, int lineno)
 {
 	PyObject *exc, *v, *tb, *tmp;
 
@@ -743,7 +743,7 @@
 */
 
 PyObject *
-PyErr_ProgramText(char *filename, int lineno)
+PyErr_ProgramText(const char *filename, int lineno)
 {
 	FILE *fp;
 	int i;