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

patch 7.4.1559

Problem:    Passing cookie to a callback is clumsy.
Solution:   Change function() to take arguments and return a partial.
This commit is contained in:
Bram Moolenaar
2016-03-14 23:05:14 +01:00
parent 9cdf86b86f
commit 1735bc988c
12 changed files with 486 additions and 69 deletions

View File

@@ -1561,6 +1561,7 @@ do_pyeval (char_u *str, typval_T *rettv)
case VAR_DICT: ++rettv->vval.v_dict->dv_refcount; break;
case VAR_LIST: ++rettv->vval.v_list->lv_refcount; break;
case VAR_FUNC: func_ref(rettv->vval.v_string); break;
case VAR_PARTIAL: ++rettv->vval.v_partial->pt_refcount; break;
case VAR_UNKNOWN:
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = 0;