comparison src/evalvars.c @ 21409:2c40e60017a8 v8.2.1255

patch 8.2.1255: cannot use a lambda with quickfix functions Commit: https://github.com/vim/vim/commit/d43906d2e5969288f239df851f5ad7b1dc2c7251 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 20 21:31:32 2020 +0200 patch 8.2.1255: cannot use a lambda with quickfix functions Problem: Cannot use a lambda with quickfix functions. Solution: Add support for lambda. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/6499)
author Bram Moolenaar <Bram@vim.org>
date Mon, 20 Jul 2020 21:45:04 +0200
parents 8d1d11afd8c8
children 369cde0d5771
comparison
equal deleted inserted replaced
21408:233bc1a5e828 21409:2c40e60017a8
3847 } 3847 }
3848 dest->cb_partial = src->cb_partial; 3848 dest->cb_partial = src->cb_partial;
3849 } 3849 }
3850 3850
3851 /* 3851 /*
3852 * Copy callback from "src" to "dest", incrementing the refcounts.
3853 */
3854 void
3855 copy_callback(callback_T *dest, callback_T *src)
3856 {
3857 dest->cb_partial = src->cb_partial;
3858 if (dest->cb_partial != NULL)
3859 {
3860 dest->cb_name = src->cb_name;
3861 dest->cb_free_name = FALSE;
3862 ++dest->cb_partial->pt_refcount;
3863 }
3864 else
3865 {
3866 dest->cb_name = vim_strsave(src->cb_name);
3867 dest->cb_free_name = TRUE;
3868 func_ref(src->cb_name);
3869 }
3870 }
3871
3872 /*
3852 * Unref/free "callback" returned by get_callback() or set_callback(). 3873 * Unref/free "callback" returned by get_callback() or set_callback().
3853 */ 3874 */
3854 void 3875 void
3855 free_callback(callback_T *callback) 3876 free_callback(callback_T *callback)
3856 { 3877 {