lua-users home
lua-l archive

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


I'm calling an arbitrary Lua function from C. Is there any way to tell whether I should push arguments or not?

f = function() ... end
g = function(x) ... end

I would use lua_call(L, 0, 0) for the first and lua_call(L, 1, 0) for the second.

I'm pretty sure I don't want to use the Debug interface for this...

David Dunham   Macintosh Game Developer
GameHouse Studios     +1 206 926 5722     www.gamehouse.com
    "They said it couldn't be done but sometimes it doesn't
     work out that way." -- Casey Stengel