JDevlieghere marked an inline comment as done.
JDevlieghere added a comment.

In D71825#1811587 <https://reviews.llvm.org/D71825#1811587>, @labath wrote:

> Now back to the current patch: I see that you've dropped the part which 
> assigns the result of evaluating the module to a global variable (and 
> consequently, dropped the "local" keyword from the "mymodule" declaration). 
> That seems unfortunate, as the recommended way for writing modules is to make 
> the variable local, and return the module as a result.
>
> What's the reasoning behind that? I was expecting we would keep that part... 
> All it would take is adding an extra `lua_setglobal(m_lua_state, name)` call 
> after the `pcall` stuff.


Thanks! I couldn't get it to work yesterday evening because I was vastly 
overthinking it after looking at the package implementation and getting 
sidetracked by the meta table. I thought the runtime was doing some magic which 
I didn't fully understand and that made me overlook the stupidly simply 
solution of using using the result as a global...


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71825/new/

https://reviews.llvm.org/D71825



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to