summaryrefslogtreecommitdiffstats
path: root/Python/errors.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-24 20:00:37 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-24 20:00:37 (GMT)
commitb382b84abec70ca86683972ac1b0170d93ba7ea4 (patch)
treee4ef0926c8347aa901229e88e6fb9f5228142040 /Python/errors.c
parentcd795963c3fcb7c74a4d8684eb2c09a9f7d1a050 (diff)
downloadcpython-b382b84abec70ca86683972ac1b0170d93ba7ea4.zip
cpython-b382b84abec70ca86683972ac1b0170d93ba7ea4.tar.gz
cpython-b382b84abec70ca86683972ac1b0170d93ba7ea4.tar.bz2
Add const to some strings that are not modified
Diffstat (limited to 'Python/errors.c')
-rw-r--r--Python/errors.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 3ce889e..2dec80f 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -348,7 +348,7 @@ PyErr_SetFromErrnoWithFilenameObject(PyObject *exc, PyObject *filenameObject)
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 @@ PyErr_SetFromErrnoWithFilename(PyObject *exc, char *filename)
#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 @@ PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename(
#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 @@ PyErr_Format(PyObject *exception, const char *format, ...)
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;