Tao.Lua SDK Documentation

Lua.lua_setupvalue Method 

Sets the value of a closure's upvalue. Parameters funcindex and n are as in lua_getupvalue (see lua_getupvalue). It assigns the value at the top of the stack to the upvalue and returns its name. It also pops the value from the stack.

[Visual Basic]
Public Shared Function lua_setupvalue( _
   ByVal L As IntPtr, _
   ByVal funcindex As Integer, _
   ByVal n As Integer _
) As String
[C#]
public static string lua_setupvalue(
   IntPtr L,
   int funcindex,
   int n
);

Parameters

L
funcindex
n

Return Value

Returns NULL (and pops nothing) when the index is greater than the number of upvalues.

See Also

Lua Class | Tao.Lua Namespace