sgs_To*** [functions]
sgs_Bool sgs_ToBool( sgs_Context* C, sgs_StkIdx item )
sgs_Int sgs_ToInt( sgs_Context* C, sgs_StkIdx item )
sgs_Real sgs_ToReal( sgs_Context* C, sgs_StkIdx item )
void* sgs_ToPtr( sgs_Context* C, sgs_StkIdx item )
Return an item from the current stack frame, converted in-place to the specified type.
sgs_Bool sgs_ToBoolP( sgs_Context* C, sgs_Variable* var )
sgs_Int sgs_ToIntP( sgs_Context* C, sgs_Variable* var )
sgs_Real sgs_ToRealP( sgs_Context* C, sgs_Variable* var )
void* sgs_GetPtrP( sgs_Context* C, sgs_Variable* var )
Return the value of the specified variable, converted in-place to the specified type.
- In ***P functions previous variable is properly released before conversion takes place and reacquired afterwards.
- In-place conversion means that if the function succeeds, the variable will have the requested type.