sgs_StackItem [function]

sgs_Variable sgs_StackItem( sgs_Context* C, sgs_StkIdx item )

Returns a non-owned copy of a variable on stack.

Avoid using this function with functions that can alter the stack and remove the source item.

This function does not acquire the variable and thus can't be used in functions that modify it without previously taking ownership of it, such as sgs_Assign or sgs_To***; to acquire variable on retrieval, see sgs_GetStackItem or sgs_Acquire.