From 32b4a1ba62abe01684cbd1486274c7a40f81d78c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 11 Dec 2002 13:21:12 +0000 Subject: Constify char* API. Fixes #651363. 2.2 candidate. --- Include/dictobject.h | 6 +++--- Objects/dictobject.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Include/dictobject.h b/Include/dictobject.h index 36053e8..d3a0fc5 100644 --- a/Include/dictobject.h +++ b/Include/dictobject.h @@ -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 } diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 712ec2c..5e39dfa 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -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; -- cgit v0.12