mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
feat(lua-api): avoid unnecessary allocations (#19877)
Lua makes (or reuses) an internal copy of strings, so we can safely push buf pointers onto the stack.
This commit is contained in:
@@ -796,7 +796,8 @@ def extract_from_xml(filename, target, width, fmt_vimhelp):
|
||||
|
||||
prefix = '%s(' % name
|
||||
suffix = '%s)' % ', '.join('{%s}' % a[1] for a in params
|
||||
if a[0] not in ('void', 'Error', 'Arena'))
|
||||
if a[0] not in ('void', 'Error', 'Arena',
|
||||
'lua_State'))
|
||||
|
||||
if not fmt_vimhelp:
|
||||
c_decl = '%s %s(%s);' % (return_type, name, ', '.join(c_args))
|
||||
|
Reference in New Issue
Block a user