Commit 39055360 authored by Robert Bradshaw's avatar Robert Bradshaw

Merge pull request #108 from bfroehle/_cxx_warnings

Fix a couple of C++ warnings.
parents 26032d37 257e73ca
...@@ -107,7 +107,7 @@ typedef struct { ...@@ -107,7 +107,7 @@ typedef struct {
/////////////// GetAndReleaseBuffer /////////////// /////////////// GetAndReleaseBuffer ///////////////
#if PY_MAJOR_VERSION < 3 #if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
PyObject *getbuffer_cobj; CYTHON_UNUSED PyObject *getbuffer_cobj;
#if PY_VERSION_HEX >= 0x02060000 #if PY_VERSION_HEX >= 0x02060000
if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
...@@ -151,7 +151,7 @@ fail: ...@@ -151,7 +151,7 @@ fail:
static void __Pyx_ReleaseBuffer(Py_buffer *view) { static void __Pyx_ReleaseBuffer(Py_buffer *view) {
PyObject *obj = view->obj; PyObject *obj = view->obj;
PyObject *releasebuffer_cobj; CYTHON_UNUSED PyObject *releasebuffer_cobj;
if (!obj) return; if (!obj) return;
......
...@@ -278,7 +278,7 @@ static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) { ...@@ -278,7 +278,7 @@ static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) {
if (value == Py_None) if (value == Py_None)
ret = PyIter_Next(yf); ret = PyIter_Next(yf);
else else
ret = PyObject_CallMethod(yf, "send", "O", value); ret = PyObject_CallMethod(yf, (char*)"send", (char*)"O", value);
} }
gen->is_running = 0; gen->is_running = 0;
//Py_DECREF(yf); //Py_DECREF(yf);
...@@ -310,7 +310,7 @@ static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) { ...@@ -310,7 +310,7 @@ static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
} }
PyErr_Clear(); PyErr_Clear();
} else { } else {
retval = PyObject_CallFunction(meth, ""); retval = PyObject_CallFunction(meth, NULL);
Py_DECREF(meth); Py_DECREF(meth);
if (!retval) if (!retval)
err = -1; err = -1;
......
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