Hi vim-dev list and Bram.
I found a problem and a future concern on if_lua. And I wrote an attached patch to fix those. Please check it. Procedure to reproduce the problem is like this: > let x = { 'v': 123 } > echo x > => {'v': 123 } > > lua x1 = vim.eval('x') > lua print(x1.v) > => 123 > > lua x1.v = 999 > > echo x > => {'v': 123} > > lua x2 = vim.eval('x') > lua print(x2.v) > => 999 Last printed '999' is not expected, it must be '123'. A future concern is LUA_ENVIRONINDEX. LUA_ENVIRONINDEX is removed from Lua 5.2 entirely. To support Lua 5.2 we must stop to use LUA_ENVIRONINDEX. Fortunately, a cause of the problem is confused references in LUA_ENVIRONINDEX. So in my patch, I subsititute LUA_REGISTRYINDEX for LUA_ENVIRONINDEX, and separate some tables depend on its usage in LUA_REGISTRYINDEX. Thanks. -- MURAOKA Taro <koron.kaor...@gmail.com> -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
patch-lua_fix_confused_references.diff
Description: Binary data