Mercurial > vim
comparison src/if_mzsch.c @ 9723:80ac9cf77c9b v7.4.2137
commit https://github.com/vim/vim/commit/437bafe4c8a83ed71ee006eda7f54b65a90f0d4c
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 1 15:40:54 2016 +0200
patch 7.4.2137
Problem: Using function() with a name will find another function when it is
redefined.
Solution: Add funcref(). Refer to lambda using a partial. Fix several
reference counting issues.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 01 Aug 2016 15:45:07 +0200 |
parents | fd9727ae3c49 |
children | 4cb5ab124239 |
comparison
equal
deleted
inserted
replaced
9722:1557241fd3a7 | 9723:80ac9cf77c9b |
---|---|
3132 MZ_GC_REG(); | 3132 MZ_GC_REG(); |
3133 | 3133 |
3134 /* FIXME: func_ref() and func_unref() are needed. */ | 3134 /* FIXME: func_ref() and func_unref() are needed. */ |
3135 /* TODO: Support pt_dict and pt_argv. */ | 3135 /* TODO: Support pt_dict and pt_argv. */ |
3136 funcname = scheme_make_byte_string( | 3136 funcname = scheme_make_byte_string( |
3137 (char *)vim_value->vval.v_partial->pt_name); | 3137 (char *)partial_name(vim_value->vval.v_partial)); |
3138 MZ_GC_CHECK(); | 3138 MZ_GC_CHECK(); |
3139 result = scheme_make_closed_prim_w_arity(vim_funcref, funcname, | 3139 result = scheme_make_closed_prim_w_arity(vim_funcref, funcname, |
3140 (const char *)BYTE_STRING_VALUE(funcname), 0, -1); | 3140 (const char *)BYTE_STRING_VALUE(funcname), 0, -1); |
3141 MZ_GC_CHECK(); | 3141 MZ_GC_CHECK(); |
3142 | 3142 |