Patch 7.4.1129
Problem:    Python None value can't be converted to a Vim value.
Solution:   Just use zero. (Damien)
Files:      src/if_py_both.h, src/testdir/test86.in, src/testdir/test86.ok,
            src/testdir/test87.in, src/testdir/test87.ok


*** ../vim-7.4.1128/src/if_py_both.h    2015-11-10 13:24:16.510859839 +0100
--- src/if_py_both.h    2016-01-17 22:30:30.401654182 +0100
***************
*** 5521,5527 ****
      }
      else
      {
!       if (ConvertFromPyObject(run_ret, rettv) == -1)
            EMSG(_("E859: Failed to convert returned python object to vim 
value"));
        Py_DECREF(run_ret);
      }
--- 5521,5527 ----
      }
      else
      {
!       if (run_ret != Py_None && ConvertFromPyObject(run_ret, rettv) == -1)
            EMSG(_("E859: Failed to convert returned python object to vim 
value"));
        Py_DECREF(run_ret);
      }
*** ../vim-7.4.1128/src/testdir/test86.in       2015-12-29 16:33:55.113217744 
+0100
--- src/testdir/test86.in       2016-01-17 22:30:30.405654138 +0100
***************
*** 329,334 ****
--- 329,336 ----
  :$put =string(l)
  :let d=pyeval('{"a": "b", "c": 1, "d": ["e"]}')
  :$put =sort(items(d))
+ :let v:errmsg = ''
+ :$put ='pyeval(\"None\") = ' . pyeval('None') . v:errmsg
  :if has('float')
  :   let f=pyeval('0.0')
  :   $put =string(f)
*** ../vim-7.4.1128/src/testdir/test86.ok       2015-11-02 13:28:43.573894165 
+0100
--- src/testdir/test86.ok       2016-01-17 22:30:30.405654138 +0100
***************
*** 86,91 ****
--- 86,92 ----
  ['a', 'b']
  ['c', 1]
  ['d', ['e']]
+ pyeval("None") = 0
  0.0
  "\0": Vim(let):E859:
  {"\0": 1}:    Vim(let):E859:
*** ../vim-7.4.1128/src/testdir/test87.in       2015-12-29 16:33:55.113217744 
+0100
--- src/testdir/test87.in       2016-01-17 22:30:30.405654138 +0100
***************
*** 326,331 ****
--- 326,333 ----
  :$put =string(l)
  :let d=py3eval('{"a": "b", "c": 1, "d": ["e"]}')
  :$put =sort(items(d))
+ :let v:errmsg = ''
+ :$put ='py3eval(\"None\") = ' . py3eval('None') . v:errmsg
  :if has('float')
  :   let f=py3eval('0.0')
  :   $put =string(f)
*** ../vim-7.4.1128/src/testdir/test87.ok       2015-11-02 13:28:43.577894118 
+0100
--- src/testdir/test87.ok       2016-01-17 22:30:30.405654138 +0100
***************
*** 86,91 ****
--- 86,92 ----
  ['a', 'b']
  ['c', 1]
  ['d', ['e']]
+ py3eval("None") = 0
  0.0
  "\0": Vim(let):E859:
  {"\0": 1}:    Vim(let):E859:
*** ../vim-7.4.1128/src/version.c       2016-01-17 22:15:10.607764092 +0100
--- src/version.c       2016-01-17 22:31:03.821286909 +0100
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     1129,
  /**/

-- 
Imagine a world without hypothetical situations.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui