diff Python/errors.c @ 42794:84618b2064c1

Add const to some strings that are not modified
author Neal Norwitz <nnorwitz@gmail.com>
date Fri, 24 Aug 2007 20:00:37 +0000
parents 61fb597917d1
children b51ac2d2d538
line wrap: on
line diff
--- a/Python/errors.c	Fri Aug 24 19:54:13 2007 +0000
+++ b/Python/errors.c	Fri Aug 24 20:00:37 2007 +0000
@@ -348,7 +348,7 @@
 
 
 PyObject *
-PyErr_SetFromErrnoWithFilename(PyObject *exc, char *filename)
+PyErr_SetFromErrnoWithFilename(PyObject *exc, const char *filename)
 {
 	PyObject *name = filename ? PyUnicode_FromString(filename) : NULL;
 	PyObject *result = PyErr_SetFromErrnoWithFilenameObject(exc, name);
@@ -358,7 +358,7 @@
 
 #ifdef Py_WIN_WIDE_FILENAMES
 PyObject *
-PyErr_SetFromErrnoWithUnicodeFilename(PyObject *exc, Py_UNICODE *filename)
+PyErr_SetFromErrnoWithUnicodeFilename(PyObject *exc, const Py_UNICODE *filename)
 {
 	PyObject *name = filename ?
 	                 PyUnicode_FromUnicode(filename, wcslen(filename)) :
@@ -494,7 +494,7 @@
 #endif /* MS_WINDOWS */
 
 void
-_PyErr_BadInternalCall(char *filename, int lineno)
+_PyErr_BadInternalCall(const char *filename, int lineno)
 {
 	PyErr_Format(PyExc_SystemError,
 		     "%s:%d: bad argument to internal function",
@@ -536,9 +536,9 @@
 
 
 PyObject *
-PyErr_NewException(char *name, PyObject *base, PyObject *dict)
+PyErr_NewException(const char *name, PyObject *base, PyObject *dict)
 {
-	char *dot;
+	const char *dot;
 	PyObject *modulename = NULL;
 	PyObject *classname = NULL;
 	PyObject *mydict = NULL;