diff options
author | Lewis Russell <lewis6991@gmail.com> | 2022-11-14 18:04:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 18:04:36 +0000 |
commit | f8c671827710c6e9cca3bfd60c32098b2be8239a (patch) | |
tree | a5d949663a1b061ca82ecd89bb90f083f9a2bbb8 /scripts/gen_vimdoc.py | |
parent | 30604320072335122aea0f37890f136b2ba0e445 (diff) | |
download | rneovim-f8c671827710c6e9cca3bfd60c32098b2be8239a.tar.gz rneovim-f8c671827710c6e9cca3bfd60c32098b2be8239a.tar.bz2 rneovim-f8c671827710c6e9cca3bfd60c32098b2be8239a.zip |
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.
Diffstat (limited to 'scripts/gen_vimdoc.py')
-rwxr-xr-x | scripts/gen_vimdoc.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py index a044c8c39d..e77d3ea286 100755 --- a/scripts/gen_vimdoc.py +++ b/scripts/gen_vimdoc.py @@ -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)) |