[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Is there an equivelent of 'require' for C modules ?
- From: Lawrie Nichols <lawrien@...>
- Date: Sat, 25 Jul 2009 09:43:15 +0100
Fantastic. Thanks for the feedback (another trick to add to the list of
Lua idioms :-))
On 25/07/09 09:36, Peter Cawley wrote:
If you want to call require, then you can do so in C:
lua_call(L, 1, 1);
On Sat, Jul 25, 2009 at 9:30 AM, Lawrie Nichols<firstname.lastname@example.org> wrote:
I need to be able to load an existing lua C module from within a new C
module (from within it's luaopen_xxx function). The obvious parallel is
doing a 'require' in a lua script, but there doesn't (as far as I can find)
appear to be an equivelent C API.
I guess I could just do a lua_dostring(L,"require 'mymodule'"), but that
doesn't smell quite right.
Any ideas where I should look ?
Many thanks, Lawrie