Main types
Return types:
- SGSRESULT [int]: output code (success = 0, failure: < 0 )
- SGSBOOL [int]: simplified output code (success = 1, failure = 0)
- SGSONE [int]: always returns 1
- SGSZERO [int]: always returns 0
Virtual machine / language types:
- sgs_Bool [int32_t]: boolean value
- sgs_Int [int64_t]: integer
- sgs_Real [double]: real (floating point) value
- sgs_SizeVal [int32_t]: size type
- sgs_CFunc [int ( sgs_Context* )]: C function type
- sgs_ObjInterface [struct]: object interface description
- sgs_Variable [struct]: the combined variable type
System types:
- sgs_Context [struct]: the virtual machine
- sgs_StackFrame [struct]: the function call info object
Interface data types:
- sgs_RegFuncConst [struct { const char*, sgs_CFunc }]: function registration unit
- sgs_RegIntConst [struct { const char*, sgs_Int }]: integer registration unit
- sgs_RegRealConst [struct { const char*, sgs_Real }]: real value registration unit
- sgs_ScriptFSData [struct { void*, const char*, void*, size_t }]: virtual file system request data
Interface function types:
- sgs_MemFunc [void* ( void* userdata, void* ptr, size_t size )]: memory interface function
- sgs_OutputFunc [void ( void* userdata, sgs_Context* C, const void* buf, sgs_SizeVal size )]: output function
- sgs_MsgFunc [void ( void* userdata, sgs_Context* C, int code, const char* text )]: messaging function
- sgs_HookFunc [void ( void*, sgs_Context*, int )]: debug hook function
- sgs_ScriptFSFunc [SGSRESULT ( void*, sgs_Context*, int, sgs_ScriptFSData* )]: virtual file system function