Is there an equivelent of 'require' for C modules ?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Is there an equivelent of 'require' for C modules ?
- From: Lawrie Nichols <lawrien@...>
- Date: 2009年7月25日 09:30:50 +0100
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