Constify char* API. Fixes #651363. 2.2 candidate.

This commit is contained in:
Martin v. Löwis 2002-12-11 13:21:12 +00:00
parent b023381466
commit 32b4a1ba62
2 changed files with 6 additions and 6 deletions

View File

@ -116,9 +116,9 @@ PyAPI_FUNC(int) PyDict_MergeFromSeq2(PyObject *d,
PyObject *seq2,
int override);
PyAPI_FUNC(PyObject *) PyDict_GetItemString(PyObject *dp, char *key);
PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, char *key, PyObject *item);
PyAPI_FUNC(int) PyDict_DelItemString(PyObject *dp, char *key);
PyAPI_FUNC(PyObject *) PyDict_GetItemString(PyObject *dp, const char *key);
PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
PyAPI_FUNC(int) PyDict_DelItemString(PyObject *dp, const char *key);
#ifdef __cplusplus
}

View File

@ -1919,7 +1919,7 @@ PyTypeObject PyDict_Type = {
/* For backward compatibility with old dictionary interface */
PyObject *
PyDict_GetItemString(PyObject *v, char *key)
PyDict_GetItemString(PyObject *v, const char *key)
{
PyObject *kv, *rv;
kv = PyString_FromString(key);
@ -1931,7 +1931,7 @@ PyDict_GetItemString(PyObject *v, char *key)
}
int
PyDict_SetItemString(PyObject *v, char *key, PyObject *item)
PyDict_SetItemString(PyObject *v, const char *key, PyObject *item)
{
PyObject *kv;
int err;
@ -1945,7 +1945,7 @@ PyDict_SetItemString(PyObject *v, char *key, PyObject *item)
}
int
PyDict_DelItemString(PyObject *v, char *key)
PyDict_DelItemString(PyObject *v, const char *key)
{
PyObject *kv;
int err;