lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 16 March 2011 21:13, Patrick Rapin <toupie300@gmail.com> wrote:
>> Generic Call Function need. Thanks.
>
> My implementation of a generic call [1] is not exactly a minimum
> implementation, since it is around 1000 lines long, but I claim that
> you can interface nearly everything between C and Lua with only ONE
> function, named lua_genpcall. I found that this function can be very
> useful in several projects.

Nice, but a bit too clever for me: much of the functionality I would
never have used in my use of Clue (the functionality I'm adding now I
would have liked before), and it's the sort of API I fear I'd spend as
much time reading the documentation of as actually calling.

Note that using the same technique as you and PiL, I will get rid of
my GET/SET variable macros and hence be down to two basic calls
(protected/unprotected), plus init and (optional) close. I will
certainly not claim a minimal implementation at that point, but I
think the API will be close to minimal (the complexity of GET/SET
having been absorbed into the "call" interface).

-- 
http://rrt.sc3d.org