Code::Blocks  SVN r11506
Classes | Macros | Functions
sqapi.cpp File Reference
#include "sqpcheader.h"
#include "sqvm.h"
#include "sqstring.h"
#include "sqtable.h"
#include "sqarray.h"
#include "sqfuncproto.h"
#include "sqclosure.h"
#include "squserdata.h"
#include "sqcompiler.h"
#include "sqfuncstate.h"
#include "sqclass.h"
Include dependency graph for sqapi.cpp:

Go to the source code of this file.

Classes

struct  BufState
 

Macros

#define _GETSAFE_OBJ(v, idx, type, o)   { if(!sq_aux_gettypedarg(v,idx,type,&o)) return SQ_ERROR; }
 
#define sq_aux_paramscheck(v, count)
 

Functions

bool sq_aux_gettypedarg (HSQUIRRELVM v, SQInteger idx, SQObjectType type, SQObjectPtr **o)
 
SQInteger sq_aux_throwobject (HSQUIRRELVM v, SQObjectPtr &e)
 
SQInteger sq_aux_invalidtype (HSQUIRRELVM v, SQObjectType type)
 
HSQUIRRELVM sq_open (SQInteger initialstacksize)
 
HSQUIRRELVM sq_newthread (HSQUIRRELVM friendvm, SQInteger initialstacksize)
 
SQInteger sq_getvmstate (HSQUIRRELVM v)
 
void sq_seterrorhandler (HSQUIRRELVM v)
 
void sq_setdebughook (HSQUIRRELVM v)
 
void sq_close (HSQUIRRELVM v)
 
SQRESULT sq_compile (HSQUIRRELVM v, SQLEXREADFUNC read, SQUserPointer p, const SQChar *sourcename, SQBool raiseerror)
 
void sq_enabledebuginfo (HSQUIRRELVM v, SQBool enable)
 
void sq_notifyallexceptions (HSQUIRRELVM v, SQBool enable)
 
void sq_addref (HSQUIRRELVM v, HSQOBJECT *po)
 
SQBool sq_release (HSQUIRRELVM v, HSQOBJECT *po)
 
const SQCharsq_objtostring (HSQOBJECT *o)
 
SQInteger sq_objtointeger (HSQOBJECT *o)
 
SQFloat sq_objtofloat (HSQOBJECT *o)
 
SQBool sq_objtobool (HSQOBJECT *o)
 
void sq_pushnull (HSQUIRRELVM v)
 
void sq_pushstring (HSQUIRRELVM v, const SQChar *s, SQInteger len)
 
void sq_pushinteger (HSQUIRRELVM v, SQInteger n)
 
void sq_pushbool (HSQUIRRELVM v, SQBool b)
 
void sq_pushfloat (HSQUIRRELVM v, SQFloat n)
 
void sq_pushuserpointer (HSQUIRRELVM v, SQUserPointer p)
 
SQUserPointer sq_newuserdata (HSQUIRRELVM v, SQUnsignedInteger size)
 
void sq_newtable (HSQUIRRELVM v)
 
void sq_newarray (HSQUIRRELVM v, SQInteger size)
 
SQRESULT sq_newclass (HSQUIRRELVM v, SQBool hasbase)
 
SQBool sq_instanceof (HSQUIRRELVM v)
 
SQRESULT sq_arrayappend (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_arraypop (HSQUIRRELVM v, SQInteger idx, SQBool pushval)
 
SQRESULT sq_arrayresize (HSQUIRRELVM v, SQInteger idx, SQInteger newsize)
 
SQRESULT sq_arrayreverse (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_arrayremove (HSQUIRRELVM v, SQInteger idx, SQInteger itemidx)
 
SQRESULT sq_arrayinsert (HSQUIRRELVM v, SQInteger idx, SQInteger destpos)
 
void sq_newclosure (HSQUIRRELVM v, SQFUNCTION func, SQUnsignedInteger nfreevars)
 
SQRESULT sq_getclosureinfo (HSQUIRRELVM v, SQInteger idx, SQUnsignedInteger *nparams, SQUnsignedInteger *nfreevars)
 
SQRESULT sq_setnativeclosurename (HSQUIRRELVM v, SQInteger idx, const SQChar *name)
 
SQRESULT sq_setparamscheck (HSQUIRRELVM v, SQInteger nparamscheck, const SQChar *typemask)
 
SQRESULT sq_bindenv (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_clear (HSQUIRRELVM v, SQInteger idx)
 
void sq_pushroottable (HSQUIRRELVM v)
 
void sq_pushregistrytable (HSQUIRRELVM v)
 
void sq_pushconsttable (HSQUIRRELVM v)
 
SQRESULT sq_setroottable (HSQUIRRELVM v)
 
SQRESULT sq_setconsttable (HSQUIRRELVM v)
 
void sq_setforeignptr (HSQUIRRELVM v, SQUserPointer p)
 
SQUserPointer sq_getforeignptr (HSQUIRRELVM v)
 
void sq_push (HSQUIRRELVM v, SQInteger idx)
 
SQObjectType sq_gettype (HSQUIRRELVM v, SQInteger idx)
 
void sq_tostring (HSQUIRRELVM v, SQInteger idx)
 
void sq_tobool (HSQUIRRELVM v, SQInteger idx, SQBool *b)
 
SQRESULT sq_getinteger (HSQUIRRELVM v, SQInteger idx, SQInteger *i)
 
SQRESULT sq_getfloat (HSQUIRRELVM v, SQInteger idx, SQFloat *f)
 
SQRESULT sq_getbool (HSQUIRRELVM v, SQInteger idx, SQBool *b)
 
SQRESULT sq_getstring (HSQUIRRELVM v, SQInteger idx, const SQChar **c)
 
SQRESULT sq_getthread (HSQUIRRELVM v, SQInteger idx, HSQUIRRELVM *thread)
 
SQRESULT sq_clone (HSQUIRRELVM v, SQInteger idx)
 
SQInteger sq_getsize (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_getuserdata (HSQUIRRELVM v, SQInteger idx, SQUserPointer *p, SQUserPointer *typetag)
 
SQRESULT sq_settypetag (HSQUIRRELVM v, SQInteger idx, SQUserPointer typetag)
 
SQRESULT sq_getobjtypetag (HSQOBJECT *o, SQUserPointer *typetag)
 
SQRESULT sq_gettypetag (HSQUIRRELVM v, SQInteger idx, SQUserPointer *typetag)
 
SQRESULT sq_getuserpointer (HSQUIRRELVM v, SQInteger idx, SQUserPointer *p)
 
SQRESULT sq_setinstanceup (HSQUIRRELVM v, SQInteger idx, SQUserPointer p)
 
SQRESULT sq_setclassudsize (HSQUIRRELVM v, SQInteger idx, SQInteger udsize)
 
SQRESULT sq_getinstanceup (HSQUIRRELVM v, SQInteger idx, SQUserPointer *p, SQUserPointer typetag)
 
SQInteger sq_gettop (HSQUIRRELVM v)
 
void sq_settop (HSQUIRRELVM v, SQInteger newtop)
 
void sq_pop (HSQUIRRELVM v, SQInteger nelemstopop)
 
void sq_poptop (HSQUIRRELVM v)
 
void sq_remove (HSQUIRRELVM v, SQInteger idx)
 
SQInteger sq_cmp (HSQUIRRELVM v)
 
SQRESULT sq_newslot (HSQUIRRELVM v, SQInteger idx, SQBool bstatic)
 
SQRESULT sq_deleteslot (HSQUIRRELVM v, SQInteger idx, SQBool pushval)
 
SQRESULT sq_set (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_rawset (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_setdelegate (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_rawdeleteslot (HSQUIRRELVM v, SQInteger idx, SQBool pushval)
 
SQRESULT sq_getdelegate (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_get (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_rawget (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_getstackobj (HSQUIRRELVM v, SQInteger idx, HSQOBJECT *po)
 
const SQCharsq_getlocal (HSQUIRRELVM v, SQUnsignedInteger level, SQUnsignedInteger idx)
 
void sq_pushobject (HSQUIRRELVM v, HSQOBJECT obj)
 
void sq_resetobject (HSQOBJECT *po)
 
SQRESULT sq_throwerror (HSQUIRRELVM v, const SQChar *err)
 
void sq_reseterror (HSQUIRRELVM v)
 
void sq_getlasterror (HSQUIRRELVM v)
 
void sq_reservestack (HSQUIRRELVM v, SQInteger nsize)
 
SQRESULT sq_resume (HSQUIRRELVM v, SQBool retval, SQBool raiseerror)
 
SQRESULT sq_call (HSQUIRRELVM v, SQInteger params, SQBool retval, SQBool raiseerror)
 
SQRESULT sq_suspendvm (HSQUIRRELVM v)
 
SQRESULT sq_wakeupvm (HSQUIRRELVM v, SQBool wakeupret, SQBool retval, SQBool raiseerror, SQBool throwerror)
 
void sq_setreleasehook (HSQUIRRELVM v, SQInteger idx, SQRELEASEHOOK hook)
 
void sq_setcompilererrorhandler (HSQUIRRELVM v, SQCOMPILERERROR f)
 
SQRESULT sq_writeclosure (HSQUIRRELVM v, SQWRITEFUNC w, SQUserPointer up)
 
SQRESULT sq_readclosure (HSQUIRRELVM v, SQREADFUNC r, SQUserPointer up)
 
SQCharsq_getscratchpad (HSQUIRRELVM v, SQInteger minsize)
 
SQInteger sq_collectgarbage (HSQUIRRELVM v)
 
const SQCharsq_getfreevariable (HSQUIRRELVM v, SQInteger idx, SQUnsignedInteger nval)
 
SQRESULT sq_setfreevariable (HSQUIRRELVM v, SQInteger idx, SQUnsignedInteger nval)
 
SQRESULT sq_setattributes (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_getattributes (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_getbase (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_getclass (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_createinstance (HSQUIRRELVM v, SQInteger idx)
 
void sq_weakref (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_getweakrefval (HSQUIRRELVM v, SQInteger idx)
 
SQRESULT sq_getdefaultdelegate (HSQUIRRELVM v, SQObjectType t)
 
SQRESULT sq_next (HSQUIRRELVM v, SQInteger idx)
 
SQInteger buf_lexfeed (SQUserPointer file)
 
SQRESULT sq_compilebuffer (HSQUIRRELVM v, const SQChar *s, SQInteger size, const SQChar *sourcename, SQBool raiseerror)
 
void sq_move (HSQUIRRELVM dest, HSQUIRRELVM src, SQInteger idx)
 
void sq_setprintfunc (HSQUIRRELVM v, SQPRINTFUNCTION printfunc)
 
SQPRINTFUNCTION sq_getprintfunc (HSQUIRRELVM v)
 
void * sq_malloc (SQUnsignedInteger size)
 
void * sq_realloc (void *p, SQUnsignedInteger oldsize, SQUnsignedInteger newsize)
 
void sq_free (void *p, SQUnsignedInteger size)
 

Class Documentation

◆ BufState

struct BufState

Definition at line 1222 of file sqapi.cpp.

Collaboration diagram for BufState:
Class Members
const SQChar * buf
SQInteger ptr
SQInteger size

Macro Definition Documentation

◆ _GETSAFE_OBJ

#define _GETSAFE_OBJ (   v,
  idx,
  type,
 
)    { if(!sq_aux_gettypedarg(v,idx,type,&o)) return SQ_ERROR; }

◆ sq_aux_paramscheck

#define sq_aux_paramscheck (   v,
  count 
)
Value:
{ \
if(sq_gettop(v) < count){ v->Raise_Error(_SC("not enough params in the stack")); return SQ_ERROR; }\
}
SQInteger sq_gettop(HSQUIRRELVM v)
Definition: sqapi.cpp:664

Definition at line 29 of file sqapi.cpp.

Referenced by sq_arrayappend(), sq_arrayinsert(), sq_arraypop(), sq_arrayremove(), sq_arrayresize(), sq_arrayreverse(), sq_deleteslot(), sq_newslot(), and sq_rawdeleteslot().

Function Documentation

◆ buf_lexfeed()

SQInteger buf_lexfeed ( SQUserPointer  file)

Definition at line 1228 of file sqapi.cpp.

References BufState::buf, BufState::ptr, and BufState::size.

Referenced by sq_compilebuffer().

◆ sq_addref()

void sq_addref ( HSQUIRRELVM  v,
HSQOBJECT *  po 
)

Definition at line 137 of file sqapi.cpp.

◆ sq_arrayappend()

SQRESULT sq_arrayappend ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 263 of file sqapi.cpp.

References _GETSAFE_OBJ, and sq_aux_paramscheck.

Referenced by _regexp_capture(), _string_split(), and array_append().

◆ sq_arrayinsert()

SQRESULT sq_arrayinsert ( HSQUIRRELVM  v,
SQInteger  idx,
SQInteger  destpos 
)

Definition at line 327 of file sqapi.cpp.

References _GETSAFE_OBJ, sq_aux_paramscheck, and sq_throwerror().

◆ sq_arraypop()

SQRESULT sq_arraypop ( HSQUIRRELVM  v,
SQInteger  idx,
SQBool  pushval 
)

Definition at line 273 of file sqapi.cpp.

References _GETSAFE_OBJ, sq_aux_paramscheck, and sq_throwerror().

Referenced by array_pop().

◆ sq_arrayremove()

SQRESULT sq_arrayremove ( HSQUIRRELVM  v,
SQInteger  idx,
SQInteger  itemidx 
)

Definition at line 319 of file sqapi.cpp.

References _GETSAFE_OBJ, sq_aux_paramscheck, and sq_throwerror().

◆ sq_arrayresize()

SQRESULT sq_arrayresize ( HSQUIRRELVM  v,
SQInteger  idx,
SQInteger  newsize 
)

Definition at line 286 of file sqapi.cpp.

References _GETSAFE_OBJ, sq_aux_paramscheck, and sq_throwerror().

◆ sq_arrayreverse()

SQRESULT sq_arrayreverse ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 299 of file sqapi.cpp.

References _GETSAFE_OBJ, and sq_aux_paramscheck.

Referenced by array_reverse().

◆ sq_aux_gettypedarg()

bool sq_aux_gettypedarg ( HSQUIRRELVM  v,
SQInteger  idx,
SQObjectType  type,
SQObjectPtr **  o 
)

Definition at line 16 of file sqapi.cpp.

References IdType2Name().

◆ sq_aux_invalidtype()

SQInteger sq_aux_invalidtype ( HSQUIRRELVM  v,
SQObjectType  type 
)

Definition at line 40 of file sqapi.cpp.

References IdType2Name(), and sq_throwerror().

Referenced by sq_clone(), sq_getsize(), sq_setdelegate(), and sq_setfreevariable().

◆ sq_aux_throwobject()

SQInteger sq_aux_throwobject ( HSQUIRRELVM  v,
SQObjectPtr &  e 
)

Definition at line 34 of file sqapi.cpp.

◆ sq_bindenv()

SQRESULT sq_bindenv ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 395 of file sqapi.cpp.

References sq_throwerror().

Referenced by closure_bindenv().

◆ sq_call()

SQRESULT sq_call ( HSQUIRRELVM  v,
SQInteger  params,
SQBool  retval,
SQBool  raiseerror 
)

◆ sq_clear()

SQRESULT sq_clear ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 423 of file sqapi.cpp.

References sq_throwerror().

Referenced by obj_clear().

◆ sq_clone()

SQRESULT sq_clone ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 555 of file sqapi.cpp.

References _null_, and sq_aux_invalidtype().

◆ sq_close()

void sq_close ( HSQUIRRELVM  v)

Definition at line 110 of file sqapi.cpp.

◆ sq_cmp()

SQInteger sq_cmp ( HSQUIRRELVM  v)

Definition at line 696 of file sqapi.cpp.

◆ sq_collectgarbage()

SQInteger sq_collectgarbage ( HSQUIRRELVM  v)

Definition at line 1049 of file sqapi.cpp.

Referenced by base_collectgarbage().

◆ sq_compile()

SQRESULT sq_compile ( HSQUIRRELVM  v,
SQLEXREADFUNC  read,
SQUserPointer  p,
const SQChar sourcename,
SQBool  raiseerror 
)

Definition at line 117 of file sqapi.cpp.

References Compile().

Referenced by sq_compilebuffer(), and sqstd_loadfile().

◆ sq_compilebuffer()

SQRESULT sq_compilebuffer ( HSQUIRRELVM  v,
const SQChar s,
SQInteger  size,
const SQChar sourcename,
SQBool  raiseerror 
)

Definition at line 1236 of file sqapi.cpp.

References BufState::buf, buf_lexfeed(), BufState::ptr, BufState::size, and sq_compile().

Referenced by base_compilestring().

◆ sq_createinstance()

SQRESULT sq_createinstance ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 1158 of file sqapi.cpp.

References _GETSAFE_OBJ, and NULL.

Referenced by class_instance(), and CreateNativeClassInstance().

◆ sq_deleteslot()

SQRESULT sq_deleteslot ( HSQUIRRELVM  v,
SQInteger  idx,
SQBool  pushval 
)

Definition at line 716 of file sqapi.cpp.

References _GETSAFE_OBJ, sq_aux_paramscheck, and sq_throwerror().

◆ sq_enabledebuginfo()

void sq_enabledebuginfo ( HSQUIRRELVM  v,
SQBool  enable 
)

Definition at line 127 of file sqapi.cpp.

Referenced by base_enabledebuginfo().

◆ sq_free()

void sq_free ( void *  p,
SQUnsignedInteger  size 
)

Definition at line 1269 of file sqapi.cpp.

Referenced by sqstd_rex_free().

◆ sq_get()

SQRESULT sq_get ( HSQUIRRELVM  v,
SQInteger  idx 
)

◆ sq_getattributes()

SQRESULT sq_getattributes ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 1119 of file sqapi.cpp.

References _GETSAFE_OBJ, NULL, and sq_throwerror().

Referenced by class_getattributes().

◆ sq_getbase()

SQRESULT sq_getbase ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 1139 of file sqapi.cpp.

References _GETSAFE_OBJ, _null_, and NULL.

◆ sq_getbool()

SQRESULT sq_getbool ( HSQUIRRELVM  v,
SQInteger  idx,
SQBool *  b 
)

Definition at line 529 of file sqapi.cpp.

Referenced by _g_io_dofile(), _g_io_loadfile(), and sqstd_printcallstack().

◆ sq_getclass()

SQRESULT sq_getclass ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 1150 of file sqapi.cpp.

References _GETSAFE_OBJ, and NULL.

Referenced by instance_getclass().

◆ sq_getclosureinfo()

SQRESULT sq_getclosureinfo ( HSQUIRRELVM  v,
SQInteger  idx,
SQUnsignedInteger *  nparams,
SQUnsignedInteger *  nfreevars 
)

Definition at line 349 of file sqapi.cpp.

References sq_throwerror().

◆ sq_getdefaultdelegate()

SQRESULT sq_getdefaultdelegate ( HSQUIRRELVM  v,
SQObjectType  t 
)

Definition at line 1186 of file sqapi.cpp.

References sq_throwerror().

◆ sq_getdelegate()

SQRESULT sq_getdelegate ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 822 of file sqapi.cpp.

References _null_, and sq_throwerror().

◆ sq_getfloat()

SQRESULT sq_getfloat ( HSQUIRRELVM  v,
SQInteger  idx,
SQFloat *  f 
)

◆ sq_getforeignptr()

SQUserPointer sq_getforeignptr ( HSQUIRRELVM  v)

Definition at line 479 of file sqapi.cpp.

◆ sq_getfreevariable()

const SQChar* sq_getfreevariable ( HSQUIRRELVM  v,
SQInteger  idx,
SQUnsignedInteger  nval 
)

Definition at line 1058 of file sqapi.cpp.

References NULL.

◆ sq_getinstanceup()

SQRESULT sq_getinstanceup ( HSQUIRRELVM  v,
SQInteger  idx,
SQUserPointer *  p,
SQUserPointer  typetag 
)

◆ sq_getinteger()

SQRESULT sq_getinteger ( HSQUIRRELVM  v,
SQInteger  idx,
SQInteger *  i 
)

◆ sq_getlasterror()

void sq_getlasterror ( HSQUIRRELVM  v)

Definition at line 929 of file sqapi.cpp.

◆ sq_getlocal()

const SQChar* sq_getlocal ( HSQUIRRELVM  v,
SQUnsignedInteger  level,
SQUnsignedInteger  idx 
)

Definition at line 883 of file sqapi.cpp.

References NULL.

Referenced by base_getstackinfos(), and sqstd_printcallstack().

◆ sq_getobjtypetag()

SQRESULT sq_getobjtypetag ( HSQOBJECT *  o,
SQUserPointer *  typetag 
)

Definition at line 602 of file sqapi.cpp.

Referenced by sq_gettypetag().

◆ sq_getprintfunc()

SQPRINTFUNCTION sq_getprintfunc ( HSQUIRRELVM  v)

◆ sq_getscratchpad()

SQChar* sq_getscratchpad ( HSQUIRRELVM  v,
SQInteger  minsize 
)

Definition at line 1044 of file sqapi.cpp.

Referenced by _stream_readblob(), _string_split(), and sqstd_format().

◆ sq_getsize()

SQInteger sq_getsize ( HSQUIRRELVM  v,
SQInteger  idx 
)

◆ sq_getstackobj()

SQRESULT sq_getstackobj ( HSQUIRRELVM  v,
SQInteger  idx,
HSQOBJECT *  po 
)

Definition at line 877 of file sqapi.cpp.

◆ sq_getstring()

SQRESULT sq_getstring ( HSQUIRRELVM  v,
SQInteger  idx,
const SQChar **  c 
)

◆ sq_getthread()

SQRESULT sq_getthread ( HSQUIRRELVM  v,
SQInteger  idx,
HSQUIRRELVM *  thread 
)

Definition at line 547 of file sqapi.cpp.

References _GETSAFE_OBJ, and NULL.

◆ sq_gettop()

SQInteger sq_gettop ( HSQUIRRELVM  v)

◆ sq_gettype()

SQObjectType sq_gettype ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 489 of file sqapi.cpp.

Referenced by _blob__nexti(), _file_constructor(), declare_stream(), and sqstd_printcallstack().

◆ sq_gettypetag()

SQRESULT sq_gettypetag ( HSQUIRRELVM  v,
SQInteger  idx,
SQUserPointer *  typetag 
)

Definition at line 613 of file sqapi.cpp.

References sq_getobjtypetag(), and sq_throwerror().

◆ sq_getuserdata()

SQRESULT sq_getuserdata ( HSQUIRRELVM  v,
SQInteger  idx,
SQUserPointer *  p,
SQUserPointer *  typetag 
)

Definition at line 582 of file sqapi.cpp.

References _GETSAFE_OBJ, and NULL.

◆ sq_getuserpointer()

SQRESULT sq_getuserpointer ( HSQUIRRELVM  v,
SQInteger  idx,
SQUserPointer *  p 
)

Definition at line 621 of file sqapi.cpp.

References _GETSAFE_OBJ, and NULL.

Referenced by _file_constructor().

◆ sq_getvmstate()

SQInteger sq_getvmstate ( HSQUIRRELVM  v)

Definition at line 82 of file sqapi.cpp.

Referenced by sq_wakeupvm(), thread_getstatus(), and thread_wakeup().

◆ sq_getweakrefval()

SQRESULT sq_getweakrefval ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 1176 of file sqapi.cpp.

References sq_throwerror().

Referenced by weakref_ref().

◆ sq_instanceof()

SQBool sq_instanceof ( HSQUIRRELVM  v)

Definition at line 254 of file sqapi.cpp.

References sq_throwerror().

◆ sq_malloc()

void* sq_malloc ( SQUnsignedInteger  size)

Definition at line 1259 of file sqapi.cpp.

Referenced by DumpLiteral(), and sqstd_rex_compile().

◆ sq_move()

void sq_move ( HSQUIRRELVM  dest,
HSQUIRRELVM  src,
SQInteger  idx 
)

Definition at line 1244 of file sqapi.cpp.

Referenced by base_newthread(), thread_call(), and thread_wakeup().

◆ sq_newarray()

void sq_newarray ( HSQUIRRELVM  v,
SQInteger  size 
)

Definition at line 234 of file sqapi.cpp.

Referenced by _regexp_capture(), and _string_split().

◆ sq_newclass()

SQRESULT sq_newclass ( HSQUIRRELVM  v,
SQBool  hasbase 
)

◆ sq_newclosure()

void sq_newclosure ( HSQUIRRELVM  v,
SQFUNCTION  func,
SQUnsignedInteger  nfreevars 
)

◆ sq_newslot()

SQRESULT sq_newslot ( HSQUIRRELVM  v,
SQInteger  idx,
SQBool  bstatic 
)

Definition at line 703 of file sqapi.cpp.

References sq_aux_paramscheck, and sq_throwerror().

◆ sq_newtable()

void sq_newtable ( HSQUIRRELVM  v)

Definition at line 229 of file sqapi.cpp.

Referenced by _addrexmatch(), _system_date(), base_getstackinfos(), and CreateStaticNamespace().

◆ sq_newthread()

HSQUIRRELVM sq_newthread ( HSQUIRRELVM  friendvm,
SQInteger  initialstacksize 
)

Definition at line 64 of file sqapi.cpp.

References NULL.

Referenced by base_newthread().

◆ sq_newuserdata()

SQUserPointer sq_newuserdata ( HSQUIRRELVM  v,
SQUnsignedInteger  size 
)

Definition at line 222 of file sqapi.cpp.

◆ sq_next()

SQRESULT sq_next ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 1205 of file sqapi.cpp.

References sq_throwerror().

◆ sq_notifyallexceptions()

void sq_notifyallexceptions ( HSQUIRRELVM  v,
SQBool  enable 
)

Definition at line 132 of file sqapi.cpp.

◆ sq_objtobool()

SQBool sq_objtobool ( HSQOBJECT *  o)

Definition at line 182 of file sqapi.cpp.

◆ sq_objtofloat()

SQFloat sq_objtofloat ( HSQOBJECT *  o)

Definition at line 174 of file sqapi.cpp.

◆ sq_objtointeger()

SQInteger sq_objtointeger ( HSQOBJECT *  o)

Definition at line 166 of file sqapi.cpp.

◆ sq_objtostring()

const SQChar* sq_objtostring ( HSQOBJECT *  o)

Definition at line 158 of file sqapi.cpp.

References NULL.

◆ sq_open()

HSQUIRRELVM sq_open ( SQInteger  initialstacksize)

Definition at line 46 of file sqapi.cpp.

References NULL.

◆ sq_pop()

void sq_pop ( HSQUIRRELVM  v,
SQInteger  nelemstopop 
)

◆ sq_poptop()

void sq_poptop ( HSQUIRRELVM  v)

Definition at line 684 of file sqapi.cpp.

◆ sq_push()

void sq_push ( HSQUIRRELVM  v,
SQInteger  idx 
)

◆ sq_pushbool()

void sq_pushbool ( HSQUIRRELVM  v,
SQBool  b 
)

Definition at line 207 of file sqapi.cpp.

Referenced by _regexp_match(), and container_rawexists().

◆ sq_pushconsttable()

void sq_pushconsttable ( HSQUIRRELVM  v)

Definition at line 447 of file sqapi.cpp.

◆ sq_pushfloat()

void sq_pushfloat ( HSQUIRRELVM  v,
SQFloat  n 
)

◆ sq_pushinteger()

void sq_pushinteger ( HSQUIRRELVM  v,
SQInteger  n 
)

◆ sq_pushnull()

void sq_pushnull ( HSQUIRRELVM  v)

Definition at line 190 of file sqapi.cpp.

References _null_.

Referenced by _blob__nexti(), _stream_eos(), _stream_flush(), sq_settop(), and sqstd_createfile().

◆ sq_pushobject()

void sq_pushobject ( HSQUIRRELVM  v,
HSQOBJECT  obj 
)

Definition at line 908 of file sqapi.cpp.

◆ sq_pushregistrytable()

void sq_pushregistrytable ( HSQUIRRELVM  v)

Definition at line 442 of file sqapi.cpp.

Referenced by declare_stream(), init_streamclass(), sqstd_createblob(), and sqstd_createfile().

◆ sq_pushroottable()

void sq_pushroottable ( HSQUIRRELVM  v)

◆ sq_pushstring()

void sq_pushstring ( HSQUIRRELVM  v,
const SQChar s,
SQInteger  len 
)

◆ sq_pushuserpointer()

void sq_pushuserpointer ( HSQUIRRELVM  v,
SQUserPointer  p 
)

Definition at line 217 of file sqapi.cpp.

Referenced by sqstd_createfile().

◆ sq_rawdeleteslot()

SQRESULT sq_rawdeleteslot ( HSQUIRRELVM  v,
SQInteger  idx,
SQBool  pushval 
)

Definition at line 803 of file sqapi.cpp.

References _GETSAFE_OBJ, and sq_aux_paramscheck.

Referenced by table_rawdelete().

◆ sq_rawget()

SQRESULT sq_rawget ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 849 of file sqapi.cpp.

References sq_throwerror().

Referenced by container_rawexists(), CreateNativeClassInstance(), and table_rawget().

◆ sq_rawset()

SQRESULT sq_rawset ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 742 of file sqapi.cpp.

References sq_throwerror().

Referenced by _addrexmatch(), _set_integer_slot(), and table_rawset().

◆ sq_readclosure()

SQRESULT sq_readclosure ( HSQUIRRELVM  v,
SQREADFUNC  r,
SQUserPointer  up 
)

Definition at line 1029 of file sqapi.cpp.

References sq_throwerror().

Referenced by sqstd_loadfile().

◆ sq_realloc()

void* sq_realloc ( void *  p,
SQUnsignedInteger  oldsize,
SQUnsignedInteger  newsize 
)

Definition at line 1264 of file sqapi.cpp.

Referenced by sqstd_rex_newnode().

◆ sq_release()

SQBool sq_release ( HSQUIRRELVM  v,
HSQOBJECT *  po 
)

Definition at line 147 of file sqapi.cpp.

◆ sq_remove()

void sq_remove ( HSQUIRRELVM  v,
SQInteger  idx 
)

◆ sq_reservestack()

void sq_reservestack ( HSQUIRRELVM  v,
SQInteger  nsize 
)

Definition at line 934 of file sqapi.cpp.

◆ sq_reseterror()

void sq_reseterror ( HSQUIRRELVM  v)

Definition at line 924 of file sqapi.cpp.

References _null_.

◆ sq_resetobject()

void sq_resetobject ( HSQOBJECT *  po)

Definition at line 913 of file sqapi.cpp.

References NULL.

◆ sq_resume()

SQRESULT sq_resume ( HSQUIRRELVM  v,
SQBool  retval,
SQBool  raiseerror 
)

Definition at line 941 of file sqapi.cpp.

References _null_, and sq_throwerror().

◆ sq_set()

SQRESULT sq_set ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 732 of file sqapi.cpp.

◆ sq_setattributes()

SQRESULT sq_setattributes ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 1097 of file sqapi.cpp.

References _GETSAFE_OBJ, NULL, and sq_throwerror().

Referenced by class_setattributes().

◆ sq_setclassudsize()

SQRESULT sq_setclassudsize ( HSQUIRRELVM  v,
SQInteger  idx,
SQInteger  udsize 
)

Definition at line 637 of file sqapi.cpp.

References sq_throwerror().

◆ sq_setcompilererrorhandler()

void sq_setcompilererrorhandler ( HSQUIRRELVM  v,
SQCOMPILERERROR  f 
)

Definition at line 1012 of file sqapi.cpp.

Referenced by sqstd_seterrorhandlers().

◆ sq_setconsttable()

SQRESULT sq_setconsttable ( HSQUIRRELVM  v)

Definition at line 463 of file sqapi.cpp.

References sq_throwerror().

Referenced by base_setconsttable().

◆ sq_setdebughook()

void sq_setdebughook ( HSQUIRRELVM  v)

Definition at line 101 of file sqapi.cpp.

Referenced by base_setdebughook().

◆ sq_setdelegate()

SQRESULT sq_setdelegate ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 776 of file sqapi.cpp.

References NULL, sq_aux_invalidtype(), and sq_throwerror().

Referenced by CreateStaticNamespace().

◆ sq_seterrorhandler()

void sq_seterrorhandler ( HSQUIRRELVM  v)

Definition at line 92 of file sqapi.cpp.

Referenced by base_seterrorhandler(), and sqstd_seterrorhandlers().

◆ sq_setforeignptr()

void sq_setforeignptr ( HSQUIRRELVM  v,
SQUserPointer  p 
)

Definition at line 474 of file sqapi.cpp.

◆ sq_setfreevariable()

SQRESULT sq_setfreevariable ( HSQUIRRELVM  v,
SQInteger  idx,
SQUnsignedInteger  nval 
)

Definition at line 1073 of file sqapi.cpp.

References sq_aux_invalidtype(), and sq_throwerror().

◆ sq_setinstanceup()

SQRESULT sq_setinstanceup ( HSQUIRRELVM  v,
SQInteger  idx,
SQUserPointer  p 
)

◆ sq_setnativeclosurename()

SQRESULT sq_setnativeclosurename ( HSQUIRRELVM  v,
SQInteger  idx,
const SQChar name 
)

◆ sq_setparamscheck()

SQRESULT sq_setparamscheck ( HSQUIRRELVM  v,
SQInteger  nparamscheck,
const SQChar typemask 
)

◆ sq_setprintfunc()

void sq_setprintfunc ( HSQUIRRELVM  v,
SQPRINTFUNCTION  printfunc 
)

◆ sq_setreleasehook()

void sq_setreleasehook ( HSQUIRRELVM  v,
SQInteger  idx,
SQRELEASEHOOK  hook 
)

◆ sq_setroottable()

SQRESULT sq_setroottable ( HSQUIRRELVM  v)

Definition at line 452 of file sqapi.cpp.

References sq_throwerror().

Referenced by base_setroottable().

◆ sq_settop()

void sq_settop ( HSQUIRRELVM  v,
SQInteger  newtop 
)

◆ sq_settypetag()

SQRESULT sq_settypetag ( HSQUIRRELVM  v,
SQInteger  idx,
SQUserPointer  typetag 
)

Definition at line 591 of file sqapi.cpp.

References sq_throwerror().

Referenced by CreateClass(), SqPlus::CreateClass(), declare_stream(), and init_streamclass().

◆ sq_suspendvm()

SQRESULT sq_suspendvm ( HSQUIRRELVM  v)

Definition at line 975 of file sqapi.cpp.

Referenced by base_suspend().

◆ sq_throwerror()

SQRESULT sq_throwerror ( HSQUIRRELVM  v,
const SQChar err 
)

◆ sq_tobool()

void sq_tobool ( HSQUIRRELVM  v,
SQInteger  idx,
SQBool *  b 
)

Definition at line 503 of file sqapi.cpp.

◆ sq_tostring()

void sq_tostring ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 495 of file sqapi.cpp.

Referenced by base_print(), and default_delegate_tostring().

◆ sq_wakeupvm()

SQRESULT sq_wakeupvm ( HSQUIRRELVM  v,
SQBool  wakeupret,
SQBool  retval,
SQBool  raiseerror,
SQBool  throwerror 
)

Definition at line 980 of file sqapi.cpp.

References _null_, sq_getvmstate(), and sq_throwerror().

Referenced by thread_wakeup().

◆ sq_weakref()

void sq_weakref ( HSQUIRRELVM  v,
SQInteger  idx 
)

Definition at line 1166 of file sqapi.cpp.

Referenced by obj_delegate_weakref().

◆ sq_writeclosure()

SQRESULT sq_writeclosure ( HSQUIRRELVM  v,
SQWRITEFUNC  w,
SQUserPointer  up 
)

Definition at line 1017 of file sqapi.cpp.

References _GETSAFE_OBJ, NULL, and sq_throwerror().

Referenced by sqstd_writeclosuretofile().