[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua c-extension questions
- From: steve donovan <steve.j.donovan@...>
- Date: Sun, 4 Apr 2010 09:06:48 +0200
On Sun, Apr 4, 2010 at 6:44 AM, Brent Pedersen <bpederse@gmail.com> wrote:
> my luaopen looks like this:
>
> // in lext.c
> int luaopen_lext(lua_State *L){
> luaL_openlib(L, "lext", lext, 0);
> return 1;
> }
You should be able to directly say require 'lext', if lext.so is
sitting on your Lua cpath (the value of package.cpath - print it out
to find where lext.so needs to be). The convention for the exported
function name is luaopen_NAME if the module is NAME.so (or NAME.dll on
Windows).
steve d.