You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, this is due to a change in the internals of the Luerl state. In the old state the Lua functions would be directly kept everywhere they were referenced which meant that there could be many copies of a function. Now the functions are kept in a table in the state and referenced through that table using the funref data which means that there is only one copy of each function.
I found that my code no longer worked with the 1.0 version here, but works fine with 0.4.
To reproduce (in Elixir, apologies) in 1.0:
iex(1)> {_, chunk, _} = :luerl.load("return 2 + 5", :luerl.init())
In version 0.4, chunk would be:
{:lua_func, 1, 0, [], 1, [{:push_lit, 2.0}, {:push_lit, 5.0}, {:op, :+, 2}, :multiple, {:return, 1}]}
But in 1.0, it's now:
{:funref, 0, []}
Thanks for the library, I've much enjoyed it!
The text was updated successfully, but these errors were encountered: