Data type handling

template< class T > void sgs_PushVar( SGS_CTX, const T& );

Pushes the specified variable on the stack, automatically converting it to the most appropriate SGScript type.

template< class T > struct sgs_GetVar { T operator () ( SGS_CTX, int item ); };

template< class T > struct sgs_GetVarObj { T* operator () ( SGS_CTX, int item ); };

Takes the specified stack item and converts it to the required type.