On Wed, Apr 02, 2003 at 11:52:35PM +0200, Per Olofsson wrote:
> Should we write our own tool instead or what do you suggest?

I actually started writing something already. There's nothing that would
even compile yet but a very preliminary header file for the interface
can be found at <http://iki.fi/~tuomov/luaextl.h>. The interface should be
generic enough so that implementations of it could be written for other
languages if so is ever desired.

Some plans:

The code to register functions will be autogenerated by an ugly script
(already written) that scans the source for EXTL_EXPORT and tries to
figure out the types of arguments and output value of the following
function and generate the necessary data to call extl_register_function.
(Only int, double, (const) char *, bool, ExtlTab, ExtlFn and all
kinds of WObj:s are supported as types.) Extl_register_function would
then attempt to find a call handler for the input/output type
specification, push the actual function as an upvalue and register
the call handler with the name of the function. (The set of call handlers
and thus acceptable functions will, unfortunately, be limited.)

Lua functions will get access to Ion's objects with WWatches as userdata
pointing to the objects to keep things safe (I don't think this could
be done easily with any wrapper generator I've come across). 

Winprops will be based on Lua tables and the actual winprops are never
loaded into Ion in their entirety (add_winprop(class, instance, role,
tableref) will just store the table reference), so another requested
feature will be easily filled as the extl_table_gets functions can
then be used by modules to find entries.

PS. Would it be wise to use Lua5.0-beta or stick to 4.0.1? Strangely
the default Lua packages in Debian/unstable seems to be 4.1-alpha...

-- 
Tuomo

Reply via email to