[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Possible documentation improvement on Lua 5.1 Reference Manual, lua_call()
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Thu, 20 Jan 2011 14:41:10 +0100
2011/1/20 Steve Litt <slitt@troubleshooters.com>:
> lua_getglobal(L, "tellme");
> if (lua_pcall(L, 1, 0, 0))
> bail(L, "lua_pcall() failed");
I think you got something wrong in your demonstration. That code is
not calling "tellme", which could still be nil (or any other
non-callable value). It's calling the function that was already on the
top of the stack before you called lua_getglobal. And the function
will receive exactly one argument, the value of the global "tellme"
variable.