Fix build failure on systems with __OPTIMZE__ defined

Fixes #181
This commit is contained in:
Kovid Goyal 2017-11-24 22:42:56 +05:30
parent 89e5ae28bb
commit 356722b9a6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -268,7 +268,7 @@ linebuf_index(LineBuf* self, index_type top, index_type bottom) {
} }
static PyObject* static PyObject*
index(LineBuf *self, PyObject *args) { pyw_index(LineBuf *self, PyObject *args) {
#define index_doc "index(top, bottom) -> Scroll all lines in the range [top, bottom] by one upwards. After scrolling, bottom will be top." #define index_doc "index(top, bottom) -> Scroll all lines in the range [top, bottom] by one upwards. After scrolling, bottom will be top."
unsigned int top, bottom; unsigned int top, bottom;
if (!PyArg_ParseTuple(args, "II", &top, &bottom)) return NULL; if (!PyArg_ParseTuple(args, "II", &top, &bottom)) return NULL;
@ -435,7 +435,7 @@ static PyMethodDef methods[] = {
METHOD(set_attribute, METH_VARARGS) METHOD(set_attribute, METH_VARARGS)
METHOD(set_continued, METH_VARARGS) METHOD(set_continued, METH_VARARGS)
METHOD(dirty_lines, METH_NOARGS) METHOD(dirty_lines, METH_NOARGS)
METHOD(index, METH_VARARGS) {"index", (PyCFunction)pyw_index, METH_VARARGS, NULL},
METHOD(reverse_index, METH_VARARGS) METHOD(reverse_index, METH_VARARGS)
METHOD(insert_lines, METH_VARARGS) METHOD(insert_lines, METH_VARARGS)
METHOD(delete_lines, METH_VARARGS) METHOD(delete_lines, METH_VARARGS)