comparison src/if_py_both.h @ 7660:066ef357ea91 v7.4.1129

commit https://github.com/vim/vim/commit/77324fc9d3206a12f5ae39da1574be3ee1273591 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 17 22:37:03 2016 +0100 patch 7.4.1129 Problem: Python None value can't be converted to a Vim value. Solution: Just use zero. (Damien)
author Christian Brabandt <cb@256bit.org>
date Sun, 17 Jan 2016 22:45:04 +0100
parents de43f10a3850
children bce3b5ddb393
comparison
equal deleted inserted replaced
7659:07f11de5efca 7660:066ef357ea91
5519 EMSG(_("E858: Eval did not return a valid python object")); 5519 EMSG(_("E858: Eval did not return a valid python object"));
5520 } 5520 }
5521 } 5521 }
5522 else 5522 else
5523 { 5523 {
5524 if (ConvertFromPyObject(run_ret, rettv) == -1) 5524 if (run_ret != Py_None && ConvertFromPyObject(run_ret, rettv) == -1)
5525 EMSG(_("E859: Failed to convert returned python object to vim value")); 5525 EMSG(_("E859: Failed to convert returned python object to vim value"));
5526 Py_DECREF(run_ret); 5526 Py_DECREF(run_ret);
5527 } 5527 }
5528 PyErr_Clear(); 5528 PyErr_Clear();
5529 } 5529 }