aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Ennen <brcolow@users.noreply.github.com>2017-03-30 16:07:39 -0700
committerJustin M. Keyes <justinkz@gmail.com>2017-03-31 01:07:39 +0200
commit831eb2a9bf9fdffc1b6942e4c43bc2458f4af794 (patch)
tree6b4e6c811061dc48dd581f8f3829499d585f4c21 /src
parenteb0e94f71b1f44cebf7ae5c1bcff348264af6cef (diff)
downloadrneovim-831eb2a9bf9fdffc1b6942e4c43bc2458f4af794.tar.gz
rneovim-831eb2a9bf9fdffc1b6942e4c43bc2458f4af794.tar.bz2
rneovim-831eb2a9bf9fdffc1b6942e4c43bc2458f4af794.zip
vim-patch:7.4.2104 (#6332)
Problem: Code duplication when unreferencing a function. Solution: De-duplicate. https://github.com/vim/vim/commit/97baee80f0906ee2f651ee1215ec033e84f866ad
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.c8
-rw-r--r--src/nvim/version.c2
2 files changed, 2 insertions, 8 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 80c2fe10d7..a83e93090a 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -20711,13 +20711,7 @@ void func_unref(char_u *name)
abort();
#endif
}
- if (fp != NULL && --fp->uf_refcount <= 0) {
- // Only delete it when it's not being used. Otherwise it's done
- // when "uf_calls" becomes zero.
- if (fp->uf_calls == 0) {
- func_clear_free(fp, false);
- }
- }
+ func_ptr_unref(fp);
}
/// Unreference a Function: decrement the reference count and free it when it
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 9275a2e5bd..fdf5436a98 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -337,7 +337,7 @@ static const int included_patches[] = {
2107,
2106,
// 2105 NA
- // 2104,
+ 2104,
2103,
// 2102 NA
2101,