comparison src/if_py_both.h @ 12477:68d7bc045dbe v8.0.1118

patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs commit https://github.com/vim/vim/commit/4033c55eca575777718c0701e26635a0cc47d907 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 16 20:54:51 2017 +0200 patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs Problem: FEAT_WINDOWS adds a lot of #ifdefs while it is nearly always enabled and only adds 7% to the binary size of the tiny build. Solution: Graduate FEAT_WINDOWS.
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Sep 2017 21:00:06 +0200
parents 91a26b7a4119
children 3ca08bf99396
comparison
equal deleted inserted replaced
12476:2516383741e6 12477:68d7bc045dbe
3870 3870
3871 return Py_BuildValue("(ll)", (long)(pos->lnum), (long)(pos->col)); 3871 return Py_BuildValue("(ll)", (long)(pos->lnum), (long)(pos->col));
3872 } 3872 }
3873 else if (strcmp(name, "height") == 0) 3873 else if (strcmp(name, "height") == 0)
3874 return PyLong_FromLong((long)(self->win->w_height)); 3874 return PyLong_FromLong((long)(self->win->w_height));
3875 #ifdef FEAT_WINDOWS
3876 else if (strcmp(name, "row") == 0) 3875 else if (strcmp(name, "row") == 0)
3877 return PyLong_FromLong((long)(self->win->w_winrow)); 3876 return PyLong_FromLong((long)(self->win->w_winrow));
3878 else if (strcmp(name, "width") == 0) 3877 else if (strcmp(name, "width") == 0)
3879 return PyLong_FromLong((long)(W_WIDTH(self->win))); 3878 return PyLong_FromLong((long)(W_WIDTH(self->win)));
3880 else if (strcmp(name, "col") == 0) 3879 else if (strcmp(name, "col") == 0)
3881 return PyLong_FromLong((long)(W_WINCOL(self->win))); 3880 return PyLong_FromLong((long)(W_WINCOL(self->win)));
3882 #endif
3883 else if (strcmp(name, "vars") == 0) 3881 else if (strcmp(name, "vars") == 0)
3884 return NEW_DICTIONARY(self->win->w_vars); 3882 return NEW_DICTIONARY(self->win->w_vars);
3885 else if (strcmp(name, "options") == 0) 3883 else if (strcmp(name, "options") == 0)
3886 return OptionsNew(SREQ_WIN, self->win, (checkfun) CheckWindow, 3884 return OptionsNew(SREQ_WIN, self->win, (checkfun) CheckWindow,
3887 (PyObject *) self); 3885 (PyObject *) self);
3963 if (VimTryEnd()) 3961 if (VimTryEnd())
3964 return -1; 3962 return -1;
3965 3963
3966 return 0; 3964 return 0;
3967 } 3965 }
3968 #ifdef FEAT_WINDOWS
3969 else if (strcmp(name, "width") == 0) 3966 else if (strcmp(name, "width") == 0)
3970 { 3967 {
3971 long width; 3968 long width;
3972 win_T *savewin; 3969 win_T *savewin;
3973 3970
3986 if (VimTryEnd()) 3983 if (VimTryEnd())
3987 return -1; 3984 return -1;
3988 3985
3989 return 0; 3986 return 0;
3990 } 3987 }
3991 #endif
3992 else 3988 else
3993 { 3989 {
3994 PyErr_SetString(PyExc_AttributeError, name); 3990 PyErr_SetString(PyExc_AttributeError, name);
3995 return -1; 3991 return -1;
3996 } 3992 }