0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.0.1183: code is indented more than necessary

Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11805)
This commit is contained in:
Yegappan Lakshmanan
2023-01-12 12:33:30 +00:00
committed by Bram Moolenaar
parent 043d7b2c84
commit 0233bdfa2b
9 changed files with 401 additions and 381 deletions

View File

@@ -1393,34 +1393,31 @@ static PySequenceMethods WinListAsSeq = {
void
python_buffer_free(buf_T *buf)
{
if (BUF_PYTHON_REF(buf) != NULL)
{
BufferObject *bp = BUF_PYTHON_REF(buf);
bp->buf = INVALID_BUFFER_VALUE;
BUF_PYTHON_REF(buf) = NULL;
}
BufferObject *bp = BUF_PYTHON_REF(buf);
if (bp == NULL)
return;
bp->buf = INVALID_BUFFER_VALUE;
BUF_PYTHON_REF(buf) = NULL;
}
void
python_window_free(win_T *win)
{
if (WIN_PYTHON_REF(win) != NULL)
{
WindowObject *wp = WIN_PYTHON_REF(win);
wp->win = INVALID_WINDOW_VALUE;
WIN_PYTHON_REF(win) = NULL;
}
WindowObject *wp = WIN_PYTHON_REF(win);
if (wp == NULL)
return;
wp->win = INVALID_WINDOW_VALUE;
WIN_PYTHON_REF(win) = NULL;
}
void
python_tabpage_free(tabpage_T *tab)
{
if (TAB_PYTHON_REF(tab) != NULL)
{
TabPageObject *tp = TAB_PYTHON_REF(tab);
tp->tab = INVALID_TABPAGE_VALUE;
TAB_PYTHON_REF(tab) = NULL;
}
TabPageObject *tp = TAB_PYTHON_REF(tab);
if (tp == NULL)
return;
tp->tab = INVALID_TABPAGE_VALUE;
TAB_PYTHON_REF(tab) = NULL;
}
static int