lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2012/11/20 Richard W.M. Jones <rjones@redhat.com>:
> It works, except ...
>
> On Tue, Nov 20, 2012 at 02:56:43PM +0000, Jerome Vuarand wrote:
>>   /* Set __index field of metatable to point to the methods table. */
>>   lua_setfield (L, -1, "__index");           /* mt */
>
>     lua_setfield (L, -2, "__index");
>
> That took me a few minutes to find :-)

It wasn't intentional, I just didn't run the code (as you probably
guessed). I'm glad that you find that out by yourself, It probably
means that you understand every line of your luaopen_* function now
:-)