[vim/vim] Patching of if_lua.c for lua 5.5 compatibilty (PR #19842)

3 views
Skip to first unread message

Lyderic Landry

unread,
12:39 AM (18 hours ago) 12:39 AM
to vim/vim, Subscribed

This fix #19814: Lua interface broken after Lua 5.5 upgrade (on Linux).

I used AI. I submitted the problem to OpenCode Zen and this is what it found:

Lua 5.5 renamed the function luaL_openlibs to luaL_openselectedlibs. The vim source code in src/if_lua.c still references the old function name:

  • Line 218: # define luaL_openlibs dll_luaL_openlibs
  • Line 334: void (*dll_luaL_openlibs) (lua_State *L);
  • Line 442: {"luaL_openlibs", (luaV_function) &dll_luaL_openlibs},
  • Line 2573: luaL_openlibs(L); // core libs

Verification via nm confirms the symbol doesn't exist in Lua 5.5:

$ nm -D /usr/lib/liblua.so.5.5.0 | grep luaL_openlibs
(nothing returned - symbol renamed)

OpenCode Zen patched if_lua.c and added conditions to test the lua version. I tried the patch on two configurations I have and it was successful:

  1. Arch Linux with lua 5.5
  2. Ubuntu 24.04 LTS with lua 5.4

I couldn't test on other configurations, in particular MacOS, Windows, ARM etc.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19842

Commit Summary

  • 578efe1 modified if_lua.c for lua 5.5 compatibilty

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19842@github.com>

Lyderic Landry

unread,
2:29 AM (16 hours ago) 2:29 AM
to vim/vim, Push

@lyderic pushed 1 commit.

  • fce282b removed line that seemed to do nothing, but maybe cause of automatic


View it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19842/before/578efe1d8bc9a04f7bed0c2d3fcd971863ac3191/after/fce282b1965fe0bc0cc72e440bf5bbe86c911d7a@github.com>

Lyderic Landry

unread,
2:55 AM (15 hours ago) 2:55 AM
to vim/vim, Push

@lyderic pushed 0 commits.


View it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19842/before/fce282b1965fe0bc0cc72e440bf5bbe86c911d7a/after/578efe1d8bc9a04f7bed0c2d3fcd971863ac3191@github.com>

Lyderic Landry

unread,
4:49 AM (13 hours ago) 4:49 AM
to vim/vim, Push

@lyderic pushed 1 commit.

  • bebf606 ran preproc_indent.vim to fix indentations


View it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19842/before/578efe1d8bc9a04f7bed0c2d3fcd971863ac3191/after/bebf606d562edc21dccae2462fc55a2f7b8bd1f8@github.com>

Lyderic Landry

unread,
5:18 AM (13 hours ago) 5:18 AM
to vim/vim, Push

@lyderic pushed 1 commit.


View it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19842/before/bebf606d562edc21dccae2462fc55a2f7b8bd1f8/after/d9d10ab91f2e511cdd33b143e42a04f8e99632f9@github.com>

Reply all
Reply to author
Forward
0 new messages