To support Lua 5.2, there are Luis's two variation of patches. A. Small change version. (Copied variable version) B. Big change version. (Shared variable version)
Patch A is seem to work for now. But patch B will take some times, we need more investigation to reduce explicit or implicit problems. So, I want to suggest to include patch A as soon as possible, then work on patch B. 2012/1/20 Luis Carvalho <[email protected]>: >> The patch causes crash. >> >> :lua x = vim.dict() >> >> :let x = luaeval("x") >> :unlet x >> :call garbagecollect() >> :" waste memory to reuse memory used for x ... >> :for i in range(9999) | let foo = repeat('foo', 9999) | endfor >> >> :lua print(x.abc) >> crash... >> >> >> dict->dv_refcount++ doesn't guard object from garbagecollect. > > Many thanks for the report. Now I know what these {l,d}v_copyID were for... :) > Please check attached patch. There's another change: I had to make the cache > table a weak-valued table again, otherwise there would be no way that lists > and dicts would get collected in Lua. > > Any feedback is, again, appreciated -- especially bug reports! > > Cheers, > Luis > > -- > Computers are useless. They can only give you answers. > -- Pablo Picasso > > -- > Luis Carvalho (Kozure) > lua -e 'print((("[email protected]"):gsub("(%u+%.)","")))' > > -- > 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 -- 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
