|
Karsten Hopp |
09c09e |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
09c09e |
Subject: Patch 7.3.683
|
|
Karsten Hopp |
09c09e |
Fcc: outbox
|
|
Karsten Hopp |
09c09e |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
09c09e |
Mime-Version: 1.0
|
|
Karsten Hopp |
09c09e |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
09c09e |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
09c09e |
------------
|
|
Karsten Hopp |
09c09e |
|
|
Karsten Hopp |
09c09e |
Patch 7.3.683
|
|
Karsten Hopp |
09c09e |
Problem: ":python" may crash when vimbindeval() returns None.
|
|
Karsten Hopp |
09c09e |
Solution: Check for v_string to be NULL. (Yukihiro Nakadaira)
|
|
Karsten Hopp |
09c09e |
Files: src/if_py_both.h
|
|
Karsten Hopp |
09c09e |
|
|
Karsten Hopp |
09c09e |
|
|
Karsten Hopp |
09c09e |
*** ../vim-7.3.682/src/if_py_both.h 2012-09-21 14:00:05.000000000 +0200
|
|
Karsten Hopp |
09c09e |
--- src/if_py_both.h 2012-10-05 21:05:06.000000000 +0200
|
|
Karsten Hopp |
09c09e |
***************
|
|
Karsten Hopp |
09c09e |
*** 351,357 ****
|
|
Karsten Hopp |
09c09e |
|
|
Karsten Hopp |
09c09e |
if (our_tv->v_type == VAR_STRING)
|
|
Karsten Hopp |
09c09e |
{
|
|
Karsten Hopp |
09c09e |
! result = Py_BuildValue("s", our_tv->vval.v_string);
|
|
Karsten Hopp |
09c09e |
}
|
|
Karsten Hopp |
09c09e |
else if (our_tv->v_type == VAR_NUMBER)
|
|
Karsten Hopp |
09c09e |
{
|
|
Karsten Hopp |
09c09e |
--- 351,358 ----
|
|
Karsten Hopp |
09c09e |
|
|
Karsten Hopp |
09c09e |
if (our_tv->v_type == VAR_STRING)
|
|
Karsten Hopp |
09c09e |
{
|
|
Karsten Hopp |
09c09e |
! result = Py_BuildValue("s", our_tv->vval.v_string == NULL
|
|
Karsten Hopp |
09c09e |
! ? "" : (char *)our_tv->vval.v_string);
|
|
Karsten Hopp |
09c09e |
}
|
|
Karsten Hopp |
09c09e |
else if (our_tv->v_type == VAR_NUMBER)
|
|
Karsten Hopp |
09c09e |
{
|
|
Karsten Hopp |
09c09e |
***************
|
|
Karsten Hopp |
09c09e |
*** 2751,2757 ****
|
|
Karsten Hopp |
09c09e |
switch (tv->v_type)
|
|
Karsten Hopp |
09c09e |
{
|
|
Karsten Hopp |
09c09e |
case VAR_STRING:
|
|
Karsten Hopp |
09c09e |
! return PyBytes_FromString((char *) tv->vval.v_string);
|
|
Karsten Hopp |
09c09e |
case VAR_NUMBER:
|
|
Karsten Hopp |
09c09e |
return PyLong_FromLong((long) tv->vval.v_number);
|
|
Karsten Hopp |
09c09e |
#ifdef FEAT_FLOAT
|
|
Karsten Hopp |
09c09e |
--- 2752,2759 ----
|
|
Karsten Hopp |
09c09e |
switch (tv->v_type)
|
|
Karsten Hopp |
09c09e |
{
|
|
Karsten Hopp |
09c09e |
case VAR_STRING:
|
|
Karsten Hopp |
09c09e |
! return PyBytes_FromString(tv->vval.v_string == NULL
|
|
Karsten Hopp |
09c09e |
! ? "" : (char *)tv->vval.v_string);
|
|
Karsten Hopp |
09c09e |
case VAR_NUMBER:
|
|
Karsten Hopp |
09c09e |
return PyLong_FromLong((long) tv->vval.v_number);
|
|
Karsten Hopp |
09c09e |
#ifdef FEAT_FLOAT
|
|
Karsten Hopp |
09c09e |
***************
|
|
Karsten Hopp |
09c09e |
*** 2763,2769 ****
|
|
Karsten Hopp |
09c09e |
case VAR_DICT:
|
|
Karsten Hopp |
09c09e |
return DictionaryNew(tv->vval.v_dict);
|
|
Karsten Hopp |
09c09e |
case VAR_FUNC:
|
|
Karsten Hopp |
09c09e |
! return FunctionNew(tv->vval.v_string);
|
|
Karsten Hopp |
09c09e |
case VAR_UNKNOWN:
|
|
Karsten Hopp |
09c09e |
Py_INCREF(Py_None);
|
|
Karsten Hopp |
09c09e |
return Py_None;
|
|
Karsten Hopp |
09c09e |
--- 2765,2772 ----
|
|
Karsten Hopp |
09c09e |
case VAR_DICT:
|
|
Karsten Hopp |
09c09e |
return DictionaryNew(tv->vval.v_dict);
|
|
Karsten Hopp |
09c09e |
case VAR_FUNC:
|
|
Karsten Hopp |
09c09e |
! return FunctionNew(tv->vval.v_string == NULL
|
|
Karsten Hopp |
09c09e |
! ? (char_u *)"" : tv->vval.v_string);
|
|
Karsten Hopp |
09c09e |
case VAR_UNKNOWN:
|
|
Karsten Hopp |
09c09e |
Py_INCREF(Py_None);
|
|
Karsten Hopp |
09c09e |
return Py_None;
|
|
Karsten Hopp |
09c09e |
*** ../vim-7.3.682/src/version.c 2012-10-04 22:38:32.000000000 +0200
|
|
Karsten Hopp |
09c09e |
--- src/version.c 2012-10-05 21:04:19.000000000 +0200
|
|
Karsten Hopp |
09c09e |
***************
|
|
Karsten Hopp |
09c09e |
*** 721,722 ****
|
|
Karsten Hopp |
09c09e |
--- 721,724 ----
|
|
Karsten Hopp |
09c09e |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
09c09e |
+ /**/
|
|
Karsten Hopp |
09c09e |
+ 683,
|
|
Karsten Hopp |
09c09e |
/**/
|
|
Karsten Hopp |
09c09e |
|
|
Karsten Hopp |
09c09e |
--
|
|
Karsten Hopp |
09c09e |
SIGIRO -- irony detected (iron core dumped)
|
|
Karsten Hopp |
09c09e |
|
|
Karsten Hopp |
09c09e |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
09c09e |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
09c09e |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
09c09e |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|