diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2024-03-09 15:44:19 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-03-09 15:44:19 +0100 |
commit | 35b867b685cedbcbba9d44695077ecc9a6995f4c (patch) | |
tree | 826a2fc0299ccc02ff307d04ae98c54fdc650a6b /src/evalvars.c | |
parent | b2ec0da080fb24f12a8d6f54bd7318a078ca4e6c (diff) |
patch 9.1.0160: Vim9: Add support for using a class type of itself in an object methodv9.1.0160
Problem: Add support for using a class type of itself in an object
method (thinca)
Solution: Vim9: Add support for using a class type of itself in an
object method (Yegappan Lakshmanan)
fixes: #12369
closes: #14165
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/evalvars.c')
-rw-r--r-- | src/evalvars.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/evalvars.c b/src/evalvars.c index 856e475118..de9d5b26b3 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -3830,7 +3830,7 @@ set_var( * If the variable already exists and "is_const" is FALSE the value is updated. * Otherwise the variable is created. */ - void + int set_var_const( char_u *name, scid_T sid, @@ -3854,6 +3854,7 @@ set_var_const( int var_in_autoload = FALSE; int flags = flags_arg; int free_tv_arg = !copy; // free tv_arg if not used + int rc = FAIL; if (sid != 0) { @@ -4127,10 +4128,14 @@ set_var_const( // values. item_lock(dest_tv, DICT_MAXNEST, TRUE, TRUE); + rc = OK; + failed: vim_free(name_tofree); if (free_tv_arg) clear_tv(tv_arg); + + return rc; } /* |