LuaState: Fixed referenced function pushing.
The references are no longer destroyed by the call.
This commit is contained in:
parent
5fa1a7fa22
commit
06c66a08cd
@ -338,6 +338,14 @@ protected:
|
|||||||
*/
|
*/
|
||||||
bool PushFunction(int a_FnRef);
|
bool PushFunction(int a_FnRef);
|
||||||
|
|
||||||
|
/** Pushes a function that has been saved as a reference.
|
||||||
|
Returns true if successful. Logs a warning on failure
|
||||||
|
*/
|
||||||
|
bool PushFunction(const cRef & a_FnRef)
|
||||||
|
{
|
||||||
|
return PushFunction((int)a_FnRef);
|
||||||
|
}
|
||||||
|
|
||||||
/** Pushes a function that is stored in a referenced table by name
|
/** Pushes a function that is stored in a referenced table by name
|
||||||
Returns true if successful. Logs a warning on failure
|
Returns true if successful. Logs a warning on failure
|
||||||
*/
|
*/
|
||||||
|
@ -109,7 +109,7 @@ local function WriteOverload(f, a_NumParams, a_NumReturns)
|
|||||||
|
|
||||||
-- Write the function signature:
|
-- Write the function signature:
|
||||||
f:write("bool Call(")
|
f:write("bool Call(")
|
||||||
f:write("FnT a_Function")
|
f:write("const FnT & a_Function")
|
||||||
for i = 1, a_NumParams do
|
for i = 1, a_NumParams do
|
||||||
f:write(", ParamT", i, " a_Param", i)
|
f:write(", ParamT", i, " a_Param", i)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user