[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Writing own dynamic lua-libs?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 14 Oct 2002 16:06:43 -0200
>To say it exactly (I think, if read what I wrote, I won't understand
>what I want :-)), I want to write, for example, my own
>"listdir"-function in C and dynamically register it in lua. Can I do
>this, or do I have to compile my very own lua?
You need to compiled you own Lua interpreter, but you can use precompiled Lua
libraries. Use lua_register to export C funtions to Lua. But note that those
C functions must follow a protocol. See etc/min.c for an example.