mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 00:18:33 +00:00
gen_api_dispatch.lua: allow msgpack int for Float args; test: add ui_pum_set_bounds and tv_dict_add_float tests
This commit is contained in:
@@ -237,6 +237,12 @@ for i = 1, #functions do
|
||||
(j - 1)..'].type == kObjectTypeInteger && args.items['..(j - 1)..'].data.integer >= 0) {')
|
||||
output:write('\n '..converted..' = (handle_T)args.items['..(j - 1)..'].data.integer;')
|
||||
end
|
||||
if rt:match('^Float$') then
|
||||
-- accept integers for Floats
|
||||
output:write('\n } else if (args.items['..
|
||||
(j - 1)..'].type == kObjectTypeInteger) {')
|
||||
output:write('\n '..converted..' = (Float)args.items['..(j - 1)..'].data.integer;')
|
||||
end
|
||||
-- accept empty lua tables as empty dictionarys
|
||||
if rt:match('^Dictionary') then
|
||||
output:write('\n } else if (args.items['..(j - 1)..'].type == kObjectTypeArray && args.items['..(j - 1)..'].data.array.size == 0) {') --luacheck: ignore 631
|
||||
|
Reference in New Issue
Block a user