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

updated for version 7.3.939

Problem:    Using Py_BuildValue is inefficient sometimes.
Solution:   Use PyLong_FromLong(). (ZyX)
This commit is contained in:
Bram Moolenaar
2013-05-12 19:09:51 +02:00
parent 6d21645f46
commit 99add41656
2 changed files with 4 additions and 2 deletions

View File

@@ -1838,10 +1838,10 @@ WindowAttr(WindowObject *this, char *name)
return Py_BuildValue("(ll)", (long)(pos->lnum), (long)(pos->col));
}
else if (strcmp(name, "height") == 0)
return Py_BuildValue("l", (long)(this->win->w_height));
return PyLong_FromLong((long)(this->win->w_height));
#ifdef FEAT_VERTSPLIT
else if (strcmp(name, "width") == 0)
return Py_BuildValue("l", (long)(W_WIDTH(this->win)));
return PyLong_FromLong((long)(W_WIDTH(this->win)));
#endif
else if (strcmp(name, "vars") == 0)
return DictionaryNew(this->win->w_vars);

View File

@@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
939,
/**/
938,
/**/