To: vim_dev@googlegroups.com Subject: Patch 8.2.4822 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4822 Problem: Setting ufunc to NULL twice. Solution: Set ufunc to NULL in find_exported(). (closes #19275) Files: src/eval.c, src/vim9script.c *** ../vim-8.2.4821/src/eval.c 2022-04-24 21:33:17.038835419 +0100 --- src/eval.c 2022-04-24 21:53:19.121782443 +0100 *************** *** 6159,6165 **** char_u *exp_name; int cc; int idx; ! ufunc_T *ufunc = NULL; type_T *type; // Found script from "import {name} as name", script item name must --- 6159,6165 ---- char_u *exp_name; int cc; int idx; ! ufunc_T *ufunc; type_T *type; // Found script from "import {name} as name", script item name must *** ../vim-8.2.4821/src/vim9script.c 2022-04-24 21:33:17.038835419 +0100 --- src/vim9script.c 2022-04-24 21:51:26.769971472 +0100 *************** *** 710,715 **** --- 710,717 ---- svar_T *sv; scriptitem_T *script = SCRIPT_ITEM(sid); + *ufunc = NULL; + if (script->sn_import_autoload && script->sn_state == SN_STATE_NOT_LOADED) { if (do_source(script->sn_name, FALSE, DOSO_NONE, NULL) == FAIL) *************** *** 724,730 **** if (idx >= 0) { sv = ((svar_T *)script->sn_var_vals.ga_data) + idx; - *ufunc = NULL; if ((sv->sv_flags & SVFLAG_EXPORTED) == 0) { if (verbose) --- 726,731 ---- *** ../vim-8.2.4821/src/version.c 2022-04-24 21:33:17.038835419 +0100 --- src/version.c 2022-04-24 21:53:04.017810263 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4822, /**/ -- hundred-and-one symptoms of being an internet addict: 45. You buy a Captain Kirk chair with a built-in keyboard and mouse. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///