Mercurial > vim
comparison src/userfunc.c @ 26445:568f93dcdc62 v8.2.3753
patch 8.2.3753: Vim9: function unreferenced while called is never deleted
Commit: https://github.com/vim/vim/commit/2336c376d5796446d44622b0dfa8fd3fd1a5d22b
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Dec 6 15:06:54 2021 +0000
patch 8.2.3753: Vim9: function unreferenced while called is never deleted
Problem: Vim9: function unreferenced while called is never deleted.
Solution: Delete a function when no longer referenced.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 06 Dec 2021 16:15:03 +0100 |
parents | b18f3b0f317c |
children | 65b4109a4297 |
comparison
equal
deleted
inserted
replaced
26444:aee00d57234d | 26445:568f93dcdc62 |
---|---|
2279 | 2279 |
2280 /* | 2280 /* |
2281 * Free all things that a function contains and free the function itself. | 2281 * Free all things that a function contains and free the function itself. |
2282 * When "force" is TRUE we are exiting. | 2282 * When "force" is TRUE we are exiting. |
2283 */ | 2283 */ |
2284 static void | 2284 void |
2285 func_clear_free(ufunc_T *fp, int force) | 2285 func_clear_free(ufunc_T *fp, int force) |
2286 { | 2286 { |
2287 func_clear(fp, force); | 2287 func_clear(fp, force); |
2288 if (force || fp->uf_dfunc_idx == 0 || func_name_refcount(fp->uf_name) | 2288 if (force || fp->uf_dfunc_idx == 0 || func_name_refcount(fp->uf_name) |
2289 || (fp->uf_flags & FC_COPY)) | 2289 || (fp->uf_flags & FC_COPY)) |