|
Karsten Hopp |
b3d5f5 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
b3d5f5 |
Subject: Patch 7.3.939
|
|
Karsten Hopp |
b3d5f5 |
Fcc: outbox
|
|
Karsten Hopp |
b3d5f5 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
b3d5f5 |
Mime-Version: 1.0
|
|
Karsten Hopp |
b3d5f5 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
b3d5f5 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
b3d5f5 |
------------
|
|
Karsten Hopp |
b3d5f5 |
|
|
Karsten Hopp |
b3d5f5 |
Patch 7.3.939
|
|
Karsten Hopp |
b3d5f5 |
Problem: Using Py_BuildValue is inefficient sometimes.
|
|
Karsten Hopp |
b3d5f5 |
Solution: Use PyLong_FromLong(). (ZyX)
|
|
Karsten Hopp |
b3d5f5 |
Files: src/if_py_both.h
|
|
Karsten Hopp |
b3d5f5 |
|
|
Karsten Hopp |
b3d5f5 |
|
|
Karsten Hopp |
b3d5f5 |
*** ../vim-7.3.938/src/if_py_both.h 2013-05-12 19:00:36.000000000 +0200
|
|
Karsten Hopp |
b3d5f5 |
--- src/if_py_both.h 2013-05-12 19:08:24.000000000 +0200
|
|
Karsten Hopp |
b3d5f5 |
***************
|
|
Karsten Hopp |
b3d5f5 |
*** 1838,1847 ****
|
|
Karsten Hopp |
b3d5f5 |
return Py_BuildValue("(ll)", (long)(pos->lnum), (long)(pos->col));
|
|
Karsten Hopp |
b3d5f5 |
}
|
|
Karsten Hopp |
b3d5f5 |
else if (strcmp(name, "height") == 0)
|
|
Karsten Hopp |
b3d5f5 |
! return Py_BuildValue("l", (long)(this->win->w_height));
|
|
Karsten Hopp |
b3d5f5 |
#ifdef FEAT_VERTSPLIT
|
|
Karsten Hopp |
b3d5f5 |
else if (strcmp(name, "width") == 0)
|
|
Karsten Hopp |
b3d5f5 |
! return Py_BuildValue("l", (long)(W_WIDTH(this->win)));
|
|
Karsten Hopp |
b3d5f5 |
#endif
|
|
Karsten Hopp |
b3d5f5 |
else if (strcmp(name, "vars") == 0)
|
|
Karsten Hopp |
b3d5f5 |
return DictionaryNew(this->win->w_vars);
|
|
Karsten Hopp |
b3d5f5 |
--- 1838,1847 ----
|
|
Karsten Hopp |
b3d5f5 |
return Py_BuildValue("(ll)", (long)(pos->lnum), (long)(pos->col));
|
|
Karsten Hopp |
b3d5f5 |
}
|
|
Karsten Hopp |
b3d5f5 |
else if (strcmp(name, "height") == 0)
|
|
Karsten Hopp |
b3d5f5 |
! return PyLong_FromLong((long)(this->win->w_height));
|
|
Karsten Hopp |
b3d5f5 |
#ifdef FEAT_VERTSPLIT
|
|
Karsten Hopp |
b3d5f5 |
else if (strcmp(name, "width") == 0)
|
|
Karsten Hopp |
b3d5f5 |
! return PyLong_FromLong((long)(W_WIDTH(this->win)));
|
|
Karsten Hopp |
b3d5f5 |
#endif
|
|
Karsten Hopp |
b3d5f5 |
else if (strcmp(name, "vars") == 0)
|
|
Karsten Hopp |
b3d5f5 |
return DictionaryNew(this->win->w_vars);
|
|
Karsten Hopp |
b3d5f5 |
*** ../vim-7.3.938/src/version.c 2013-05-12 19:00:36.000000000 +0200
|
|
Karsten Hopp |
b3d5f5 |
--- src/version.c 2013-05-12 19:09:19.000000000 +0200
|
|
Karsten Hopp |
b3d5f5 |
***************
|
|
Karsten Hopp |
b3d5f5 |
*** 730,731 ****
|
|
Karsten Hopp |
b3d5f5 |
--- 730,733 ----
|
|
Karsten Hopp |
b3d5f5 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
b3d5f5 |
+ /**/
|
|
Karsten Hopp |
b3d5f5 |
+ 939,
|
|
Karsten Hopp |
b3d5f5 |
/**/
|
|
Karsten Hopp |
b3d5f5 |
|
|
Karsten Hopp |
b3d5f5 |
--
|
|
Karsten Hopp |
b3d5f5 |
A mathematician is a device for turning coffee into theorems.
|
|
Karsten Hopp |
b3d5f5 |
Paul Erdos
|
|
Karsten Hopp |
b3d5f5 |
A computer programmer is a device for turning coffee into bugs.
|
|
Karsten Hopp |
b3d5f5 |
Bram Moolenaar
|
|
Karsten Hopp |
b3d5f5 |
|
|
Karsten Hopp |
b3d5f5 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
b3d5f5 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
b3d5f5 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
b3d5f5 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|