From 356722b9a6bc964a10af26d91b0ee4e16a69bff7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 24 Nov 2017 22:42:56 +0530 Subject: [PATCH] Fix build failure on systems with __OPTIMZE__ defined Fixes #181 --- kitty/line-buf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/line-buf.c b/kitty/line-buf.c index 0445a6d48..7e1da85da 100644 --- a/kitty/line-buf.c +++ b/kitty/line-buf.c @@ -268,7 +268,7 @@ linebuf_index(LineBuf* self, index_type top, index_type bottom) { } 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." unsigned int top, bottom; if (!PyArg_ParseTuple(args, "II", &top, &bottom)) return NULL; @@ -435,7 +435,7 @@ static PyMethodDef methods[] = { METHOD(set_attribute, METH_VARARGS) METHOD(set_continued, METH_VARARGS) METHOD(dirty_lines, METH_NOARGS) - METHOD(index, METH_VARARGS) + {"index", (PyCFunction)pyw_index, METH_VARARGS, NULL}, METHOD(reverse_index, METH_VARARGS) METHOD(insert_lines, METH_VARARGS) METHOD(delete_lines, METH_VARARGS)