[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: calling lua functions from C which use libraries
- From: Tassilo von Parseval <tassilo.von.parseval@...>
- Date: Mon, 14 Jun 2004 15:04:13 +0200
On Mon, Jun 14, 2004 at 11:04:26AM +0100 Jamie Webb wrote:
> On Monday 14 June 2004 10:37, Tassilo von Parseval wrote:
> > On Mon, Jun 14, 2004 at 10:01:30AM +0100 Jamie Webb wrote:
> > > On Monday 14 June 2004 09:38, Tassilo von Parseval wrote:
> > > > Hi everyone,
> > > >
> > > > I am currently working on an Inline::Lua module for Perl and I need
> > > > some help on triggering lua functions from C when those functions make
> > > > use of lua's shipped library. I did a rather thorough scan through the
> > > > mailing list archive, but apparently this issue hasn't yet been brought
> > > > up.
> > >
> > > You just need to use luaopen_base(L) and friends after you've called
> > > lua_open(). See section 5 of the manual.
> > Actually, my code is already doing this.
> > In principle I do agree, though. It should be a matter as easy as adding
> > one of the calls to luaopen_*.
> You need to call all of them. luaopen_loadlib() will only provide you with
> loadlib support (i.e. the ability to load external shared libraries).
Indeed, this works, thank you! I was under the false impression that
luaopen_loadlib() would load all of them. The docs are quite clear about
including each of them, as I see now.