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.
- Bindings exist for all basic types (except unsigned int64, since it cannot be represented properly), sgsMaybe, sgsString, sgsHandle, sgsVariable, and class pointers.