From 4033c55eca575777718c0701e26635a0cc47d907 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 16 Sep 2017 20:54:51 +0200 Subject: 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. --- src/if_py_both.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/if_py_both.h') diff --git a/src/if_py_both.h b/src/if_py_both.h index cf696258e..aa6f06bbc 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -3872,14 +3872,12 @@ WindowAttr(WindowObject *self, char *name) } else if (strcmp(name, "height") == 0) return PyLong_FromLong((long)(self->win->w_height)); -#ifdef FEAT_WINDOWS else if (strcmp(name, "row") == 0) return PyLong_FromLong((long)(self->win->w_winrow)); else if (strcmp(name, "width") == 0) return PyLong_FromLong((long)(W_WIDTH(self->win))); else if (strcmp(name, "col") == 0) return PyLong_FromLong((long)(W_WINCOL(self->win))); -#endif else if (strcmp(name, "vars") == 0) return NEW_DICTIONARY(self->win->w_vars); else if (strcmp(name, "options") == 0) @@ -3965,7 +3963,6 @@ WindowSetattr(WindowObject *self, char *name, PyObject *valObject) return 0; } -#ifdef FEAT_WINDOWS else if (strcmp(name, "width") == 0) { long width; @@ -3988,7 +3985,6 @@ WindowSetattr(WindowObject *self, char *name, PyObject *valObject) return 0; } -#endif else { PyErr_SetString(PyExc_AttributeError, name); -- cgit v1.2.1