Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 42812:a99ec4befda8
Add const to input string parameters
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Sat, 25 Aug 2007 00:32:45 +0000 |
| parents | 8bad8722f0e6 |
| children | f81d94c05a0e |
line wrap: on
line diff
--- a/Python/sysmodule.c Sat Aug 25 00:29:58 2007 +0000 +++ b/Python/sysmodule.c Sat Aug 25 00:32:45 2007 +0000 @@ -46,7 +46,7 @@ #endif PyObject * -PySys_GetObject(char *name) +PySys_GetObject(const char *name) { PyThreadState *tstate = PyThreadState_GET(); PyObject *sd = tstate->interp->sysdict; @@ -56,7 +56,7 @@ } int -PySys_SetObject(char *name, PyObject *v) +PySys_SetObject(const char *name, PyObject *v) { PyThreadState *tstate = PyThreadState_GET(); PyObject *sd = tstate->interp->sysdict; @@ -819,7 +819,7 @@ } void -PySys_AddWarnOption(char *s) +PySys_AddWarnOption(const char *s) { PyObject *str; @@ -1128,10 +1128,10 @@ } static PyObject * -makepathobject(char *path, int delim) +makepathobject(const char *path, int delim) { int i, n; - char *p; + const char *p; PyObject *v, *w; n = 1; @@ -1161,7 +1161,7 @@ } void -PySys_SetPath(char *path) +PySys_SetPath(const char *path) { PyObject *v; if ((v = makepathobject(path, DELIM)) == NULL)
