[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: dynamically associating functions with lua
- From: Asko Kauppi <asko.kauppi@...>
- Date: Tue, 21 Oct 2003 20:43:40 +0300
If you have problems doing the actual linkage to the dll, you might
check the 'dynacall' module in recent gluax. It allows linking to any
dlls/so's/dylibs on the run, without making C code.
Martin Slater kirjoittaa tiistaina, 21. lokakuuta 2003, kello 13:26:
I'm looking at lua for driving a utility that loads it functions from
dll's. The available functions are enumerated by the main app via an
interface into the dll, all functions have the same type and retrieve
their parameters off an internal stack. The problem i want to solve is
exposing these functions to lua. Currently the parameter types are
encoded by the plugin developer so the main app can type check its
input and it would be nice to be able to make these available lua.
The only thought i have is to auto generate a lua script that
implements a function stub of the same name as the the dll function,
push the function name and all its parameters into a table and call a
'c' side do_function_call that pulls this info and makes the call.
Does anyone have any better ides for doing this?