Commit 553bed86 authored by Stefan Behnel's avatar Stefan Behnel

fix some C++ compiler warnings about char* constants

parent 0fbaf538
......@@ -601,10 +601,14 @@ class GetAndReleaseBufferUtilityCode(object):
find_buffer_types(env)
proto, impl = TempitaUtilityCode.load_as_string(
util_code = TempitaUtilityCode.load(
"GetAndReleaseBuffer", from_file="Buffer.c",
context=dict(types=types))
proto = util_code.format_code(util_code.proto)
impl = util_code.format_code(
util_code.inject_string_constants(util_code.impl, output))
proto_code.putln(proto)
code.putln(impl)
......
......@@ -121,8 +121,8 @@ static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
#if PY_VERSION_HEX < 0x02060000
if (obj->ob_type->tp_dict &&
(getbuffer_cobj = PyMapping_GetItemString(obj->ob_type->tp_dict,
"__pyx_getbuffer"))) {
(getbuffer_cobj = PyObject_GetItem(obj->ob_type->tp_dict,
PYIDENT("__pyx_getbuffer")))) {
getbufferproc func;
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 0)
......@@ -170,8 +170,8 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
#if PY_VERSION_HEX < 0x02060000
if (obj->ob_type->tp_dict &&
(releasebuffer_cobj = PyMapping_GetItemString(obj->ob_type->tp_dict,
"__pyx_releasebuffer"))) {
(releasebuffer_cobj = PyObject_GetItem(obj->ob_type->tp_dict,
PYIDENT("__pyx_releasebuffer")))) {
releasebufferproc func;
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment