lua_gettop equivalent. Returns the number of elements in the stack, which
is also the index of the top element. Notice that a negative index -x is
equivalent to the positive index gettop - x + 1.
lua_rawgeti equivalent. Pushes onto the stack the value tn, where t is
the table at the given index. The access is raw, that is, it does not
invoke the __index metamethod. Returns the type of the pushed value.
lua_unref equivalent. Stores the value at idx in the registry and returns
an integer id to unref and get it. This is a strong reference, the object
will not get garbage collected until it is unreffed.
Removes the element at the given valid index, shifting down the elements
above this index to fill the gap. Cannot be called with a pseudo-index,
because a pseudo-index is not an actual stack position.
Moves the top element into the given valid index without shifting any
element (therefore replacing the value at that given index), and then pops
the top element.
Pushes onto the stack a string identifying the current position of the
control at level level in the call stack. Typically this string has the
following format: chunkname:currentline: