[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 4.0 and loadlib
- From: "Martin Spernau" <martin@...>
- Date: Wed, 21 Nov 2001 15:31:42 +0100
Wow, thx. That clears a few points for me...
I'd be really glad to hear your progress with the FFI thing.
I guess in the meantime it would / could be simpler to find some c-binding
for the special libs I might need...
Q: anybody know of a binding to a XML-parser? (Neeed not really be expat,
that was more a testcase for trying around with dlls)
Another idea (as I'm currently Windows based) would be to try LuaCOM, but
that seems to be for Lua3.2 only. Any one know of plans to update that?
Thx a lot for help and clarifications,
--"Philippe Lhoste" <PhiLho@gmx.net>
> Actually, Lua's loadlibrary is originally made to allow calling void
> functions only, ie. functions that don't need arguments (XML_ParserCreate
> expects one parameter) and don't return a value.
> The modified version found in CGILua is modified to accomodate Lua 4.0
> calling conventions, ie. it gives the current Lua stack as parameter.
> It is mostly made to allow calling functions like lua_xxxlibopen(L), ie.
> DLLs of Lua libraries.
> And that's all... What you really want is a FFI, aka. Foreign Function
> Interface, ie. a way to call any function with any number and type of
> in a Windows DLL (in your case).
> AFAIK, there is not yet such a thing for Windows. There is a FFI for
> I am trying to find some time to work on this Windows' FFI thingy, using
> SIOD FFI, since it does its call in pure C. Other FFI libraries, like
> libffi or DynaCall (see archives of this ML, names from memory, which is
> ;-) uses assembly code to manipulate the call and return stacks.
> There are also a lot of issues, like defining a good Lua interface to
> describe structures and functions, managing the return values, etc.
> Anyway, if I even get a viable result, I will of course post it here. And
> somebody beats me on this release, all the better :-)
> Philippe Lhoste (Paris -- France)
> Professional programmer and amateur artist
> Sent through GMX FreeMail - http://www.gmx.net