Thanks Bram.
And I have one more patch. To support Lua 5.2, I have wrote another additional patch which attached. Of course it supports both 5.1 and 5.2, it is auto selected depending on included lua.h version. Best regards. 2012/1/8 Bram Moolenaar <[email protected]>: > > Taro Muraoka wrote: > >> 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. > > I have no clue if this is the right solution. I'll wait a few days and > if there are no comments I'll include the patch. > > Would be good to have a few tests for the Lua interface. > > -- > Permission is granted to read this message out aloud on Kings Cross Road, > London, under the condition that the orator is properly dressed. > > /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ > \\\ an exciting new programming language -- http://www.Zimbu.org /// > \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- MURAOKA Taro <[email protected]> -- 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_support_lua52.diff
Description: Binary data
