lua-users home
lua-l archive

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



Sorry for being so dumb :) but what do you mean?

I've got 'dynacall' support in luax, allowing dll's to be attached to Lua "on the fly".

Okay.. you mean that would allow you to have multiple return types etc. fancy goodies with C functions as well. Yeah, why wouldn't that work. In fact, i'd rather like C to have such! :)

-ak

Jason P kirjoittaa lauantaina, 15. marraskuuta 2003, kello 17:45:


Anyone ever do/think of doing this?

Use the LUA state to create an easy way to pass data between C functions, without ever actually executing any LUA script. The state would act as a message holder, using the stack functions.

Any idea on the extra overhead of such a method?

lua_pushcfunction(LS,myFunc);
lua_pushstring(LS,"This is a string!");
lua_pushnumber(LS,MyNum);
lua_call(LS,2,0);

like that... ?

JP

_________________________________________________________________
Crave some Miles Davis or Grateful Dead? Your old favorites are always playing on MSN Radio Plus. Trial month free! http://join.msn.com/?page=offers/premiumradio