comparison src/vim9cmds.c @ 30168:6472aa128651 v9.0.0420

patch 9.0.0420: function went missing Commit: https://github.com/vim/vim/commit/c572ad508f53bd89aa29081fc583f17ef1f0f123 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 8 20:49:22 2022 +0100 patch 9.0.0420: function went missing Problem: Function went missing. Solution: Add the function back.
author Bram Moolenaar <Bram@vim.org>
date Thu, 08 Sep 2022 22:00:04 +0200
parents d1c04b4dc60d
children 42a6345b91fd
comparison
equal deleted inserted replaced
30167:3a316f08a3c0 30168:6472aa128651
1683 1683
1684 return skipwhite(p); 1684 return skipwhite(p);
1685 } 1685 }
1686 1686
1687 /* 1687 /*
1688 * Get the local variable index for deferred function calls.
1689 * Reserve it when not done already.
1690 * Returns zero for failure.
1691 */
1692 int
1693 get_defer_var_idx(cctx_T *cctx)
1694 {
1695 dfunc_T *dfunc = ((dfunc_T *)def_functions.ga_data)
1696 + cctx->ctx_ufunc->uf_dfunc_idx;
1697 if (dfunc->df_defer_var_idx == 0)
1698 {
1699 lvar_T *lvar = reserve_local(cctx, (char_u *)"@defer@", 7,
1700 TRUE, &t_list_any);
1701 if (lvar == NULL)
1702 return 0;
1703 dfunc->df_defer_var_idx = lvar->lv_idx + 1;
1704 }
1705 return dfunc->df_defer_var_idx;
1706 }
1707
1708 /*
1688 * Compile "defer func(arg)". 1709 * Compile "defer func(arg)".
1689 */ 1710 */
1690 char_u * 1711 char_u *
1691 compile_defer(char_u *arg_start, cctx_T *cctx) 1712 compile_defer(char_u *arg_start, cctx_T *cctx)
1692 { 1713 {