Mercurial > vim
comparison src/userfunc.c @ 22298:07e48ee8c3bb v8.2.1698
patch 8.2.1698: cannot lock a variable in legacy Vim script like in Vim9
Commit: https://github.com/vim/vim/commit/a187c43cfe8863d48b2159d695fedcb71f8525c1
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 16 21:08:28 2020 +0200
patch 8.2.1698: cannot lock a variable in legacy Vim script like in Vim9
Problem: Cannot lock a variable in legacy Vim script like in Vim9.
Solution: Make ":lockvar 0" work.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 16 Sep 2020 21:15:05 +0200 |
parents | d7c1e3efa88e |
children | a4ed0de125d9 |
comparison
equal
deleted
inserted
replaced
22297:3d2dc70119a7 | 22298:07e48ee8c3bb |
---|---|
3344 goto erret; | 3344 goto erret; |
3345 } | 3345 } |
3346 if (fudi.fd_di == NULL) | 3346 if (fudi.fd_di == NULL) |
3347 { | 3347 { |
3348 // Can't add a function to a locked dictionary | 3348 // Can't add a function to a locked dictionary |
3349 if (var_check_lock(fudi.fd_dict->dv_lock, eap->arg, FALSE)) | 3349 if (value_check_lock(fudi.fd_dict->dv_lock, eap->arg, FALSE)) |
3350 goto erret; | 3350 goto erret; |
3351 } | 3351 } |
3352 // Can't change an existing function if it is locked | 3352 // Can't change an existing function if it is locked |
3353 else if (var_check_lock(fudi.fd_di->di_tv.v_lock, eap->arg, FALSE)) | 3353 else if (value_check_lock(fudi.fd_di->di_tv.v_lock, eap->arg, FALSE)) |
3354 goto erret; | 3354 goto erret; |
3355 | 3355 |
3356 // Give the function a sequential number. Can only be used with a | 3356 // Give the function a sequential number. Can only be used with a |
3357 // Funcref! | 3357 // Funcref! |
3358 vim_free(name); | 3358 vim_free(name); |