diff src/if_python3.c @ 8538:c337c813c64d v7.4.1559

commit https://github.com/vim/vim/commit/1735bc988c546cc962c5f94792815b4d7cb79710 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 14 23:05:14 2016 +0100 patch 7.4.1559 Problem: Passing cookie to a callback is clumsy. Solution: Change function() to take arguments and return a partial.
author Christian Brabandt <cb@256bit.org>
date Mon, 14 Mar 2016 23:15:05 +0100
parents b6cb94ad97a4
children 8755d57debaa
line wrap: on
line diff
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -1654,6 +1654,7 @@ do_py3eval (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;