summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/object.c')
-rw-r--r--Objects/object.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 7b80bcb..93cdc10 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -890,10 +890,10 @@ PyObject_GetAttr(PyObject *v, PyObject *name)
if (tp->tp_getattro != NULL)
return (*tp->tp_getattro)(v, name);
if (tp->tp_getattr != NULL) {
- char *name_str = PyUnicode_AsUTF8(name);
+ const char *name_str = PyUnicode_AsUTF8(name);
if (name_str == NULL)
return NULL;
- return (*tp->tp_getattr)(v, name_str);
+ return (*tp->tp_getattr)(v, (char *)name_str);
}
PyErr_Format(PyExc_AttributeError,
"'%.50s' object has no attribute '%U'",
@@ -934,10 +934,10 @@ PyObject_SetAttr(PyObject *v, PyObject *name, PyObject *value)
return err;
}
if (tp->tp_setattr != NULL) {
- char *name_str = PyUnicode_AsUTF8(name);
+ const char *name_str = PyUnicode_AsUTF8(name);
if (name_str == NULL)
return -1;
- err = (*tp->tp_setattr)(v, name_str, value);
+ err = (*tp->tp_setattr)(v, (char *)name_str, value);
Py_DECREF(name);
return err;
}