Mercurial > vim
comparison src/evalbuffer.c @ 19564:06f29b6ea04a v8.2.0339
patch 8.2.0339: Vim9: function return type may depend on arguments
Commit: https://github.com/vim/vim/commit/fbdd08ed9b1798885915c7f27c94786906d258e4
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 1 14:04:46 2020 +0100
patch 8.2.0339: Vim9: function return type may depend on arguments
Problem: Vim9: function return type may depend on arguments.
Solution: Instead of a fixed return type use a function to figure out the
return type.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 01 Mar 2020 14:15:04 +0100 |
parents | 94eda51ba9ba |
children | 435726a03481 |
comparison
equal
deleted
inserted
replaced
19563:5d3a4b28a95b | 19564:06f29b6ea04a |
---|---|
750 end = tv_get_lnum_buf(&argvars[2], buf); | 750 end = tv_get_lnum_buf(&argvars[2], buf); |
751 | 751 |
752 get_buffer_lines(buf, lnum, end, TRUE, rettv); | 752 get_buffer_lines(buf, lnum, end, TRUE, rettv); |
753 } | 753 } |
754 | 754 |
755 type_T * | |
756 ret_f_getline(int argcount, type_T **argtypes UNUSED) | |
757 { | |
758 return argcount == 1 ? &t_string : &t_list_string; | |
759 } | |
760 | |
755 /* | 761 /* |
756 * "getline(lnum, [end])" function | 762 * "getline(lnum, [end])" function |
757 */ | 763 */ |
758 void | 764 void |
759 f_getline(typval_T *argvars, typval_T *rettv) | 765 f_getline(typval_T *argvars, typval_T *rettv) |