lua-users home
lua-l archive

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


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 :-)

Here are the updated bindings:

http://oirase.annexia.org/tmp/lua-guestfs.c.txt

and examples:

https://github.com/libguestfs/libguestfs/tree/master/lua/examples
https://github.com/libguestfs/libguestfs/tree/master/lua/tests

Thanks again,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v