[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Please comment on these Lua to C library bindings that I wrote
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Tue, 20 Nov 2012 16:47:45 +0000
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
:-)