sqapi.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. SQUIRREL_API_FUNC(SQRESULT, preload_modules, (HSQUIRRELVM v, const sq_modules_preload_st *modules))
  2. SQUIRREL_API_FUNC(SQFUNCTION, get_preload_module_func, (HSQUIRRELVM v, const SQChar *module_name))
  3. /*vm*/
  4. SQUIRREL_API_FUNC(HSQUIRRELVM, open, (SQInteger initialstacksize))
  5. SQUIRREL_API_FUNC(HSQUIRRELVM, newthread, (HSQUIRRELVM friendvm, SQInteger initialstacksize))
  6. SQUIRREL_API_FUNC(void, seterrorhandler, (HSQUIRRELVM v))
  7. SQUIRREL_API_FUNC(SQRESULT, geterrorhandler, (HSQUIRRELVM v))
  8. SQUIRREL_API_FUNC(void, setatexithandler, (HSQUIRRELVM v))
  9. SQUIRREL_API_FUNC(SQRESULT, getatexithandler, (HSQUIRRELVM v))
  10. SQUIRREL_API_FUNC(void, close, (HSQUIRRELVM v))
  11. SQUIRREL_API_FUNC(void, setforeignptr, (HSQUIRRELVM v,SQUserPointer p))
  12. SQUIRREL_API_FUNC(SQUserPointer, getforeignptr, (HSQUIRRELVM v))
  13. SQUIRREL_API_FUNC(void, setsharedforeignptr, (HSQUIRRELVM v,SQUserPointer p))
  14. SQUIRREL_API_FUNC(SQUserPointer, getsharedforeignptr, (HSQUIRRELVM v))
  15. SQUIRREL_API_FUNC(void, setvmreleasehook, (HSQUIRRELVM v,SQRELEASEHOOK hook))
  16. SQUIRREL_API_FUNC(SQRELEASEHOOK, getvmreleasehook, (HSQUIRRELVM v))
  17. SQUIRREL_API_FUNC(void, setsharedreleasehook, (HSQUIRRELVM v,SQRELEASEHOOK hook))
  18. SQUIRREL_API_FUNC(SQRELEASEHOOK, getsharedreleasehook, (HSQUIRRELVM v))
  19. SQUIRREL_API_FUNC(void, setprintfunc, (HSQUIRRELVM v, SQPRINTFUNCTION printfunc,SQPRINTFUNCTION errfunc))
  20. SQUIRREL_API_FUNC(SQPRINTFUNCTION, getprintfunc, (HSQUIRRELVM v))
  21. SQUIRREL_API_FUNC(SQPRINTFUNCTION, geterrorfunc, (HSQUIRRELVM v))
  22. SQUIRREL_API_FUNC(SQRESULT, suspendvm, (HSQUIRRELVM v))
  23. SQUIRREL_API_FUNC(SQRESULT, wakeupvm, (HSQUIRRELVM v,SQBool resumedret,SQBool retval,SQBool raiseerror,SQBool throwerror))
  24. SQUIRREL_API_FUNC(SQInteger, getvmstate, (HSQUIRRELVM v))
  25. SQUIRREL_API_FUNC(SQInteger, getversion, ())
  26. /*compiler*/
  27. #ifndef SQ_MAX_INCLUDE_FILES
  28. #define SQ_MAX_INCLUDE_FILES 10
  29. #endif
  30. SQUIRREL_API_FUNC(SQRESULT, compile, (HSQUIRRELVM v,SQLEXREADFUNC read,SQUserPointer p,const SQChar *sourcename,
  31. SQBool raiseerror, SQBool show_warnings, SQInteger max_nested_includes))
  32. SQUIRREL_API_FUNC(SQRESULT, compilebuffer, (HSQUIRRELVM v,const SQChar *s,SQInteger size,const SQChar *sourcename,
  33. SQBool raiseerror, SQBool show_warnings, SQInteger max_nested_includes))
  34. SQUIRREL_API_FUNC(void, enabledebuginfo, (HSQUIRRELVM v, SQBool enable))
  35. SQUIRREL_API_FUNC(void, notifyallexceptions, (HSQUIRRELVM v, SQBool enable))
  36. SQUIRREL_API_FUNC(void, setcompilererrorhandler, (HSQUIRRELVM v,SQCOMPILERERROR f))
  37. /*stack operations*/
  38. SQUIRREL_API_FUNC(void, push, (HSQUIRRELVM v,SQInteger idx))
  39. SQUIRREL_API_FUNC(void, pop, (HSQUIRRELVM v,SQInteger nelemstopop))
  40. SQUIRREL_API_FUNC(void, poptop, (HSQUIRRELVM v))
  41. SQUIRREL_API_FUNC(void, remove, (HSQUIRRELVM v,SQInteger idx))
  42. SQUIRREL_API_FUNC(void, insert, (HSQUIRRELVM v,SQInteger idx))
  43. SQUIRREL_API_FUNC(void, replace, (HSQUIRRELVM v,SQInteger idx))
  44. SQUIRREL_API_FUNC(SQInteger, gettop, (HSQUIRRELVM v))
  45. SQUIRREL_API_FUNC(void, settop, (HSQUIRRELVM v,SQInteger newtop))
  46. SQUIRREL_API_FUNC(SQRESULT, reservestack, (HSQUIRRELVM v,SQInteger nsize))
  47. SQUIRREL_API_FUNC(SQInteger, compare, (HSQUIRRELVM v, SQInteger idx1, SQInteger idx2))
  48. SQUIRREL_API_FUNC(SQInteger, cmp, (HSQUIRRELVM v))
  49. SQUIRREL_API_FUNC(void, move, (HSQUIRRELVM dest,HSQUIRRELVM src,SQInteger idx))
  50. /*object creation handling*/
  51. SQUIRREL_API_FUNC(SQUserPointer, newuserdata, (HSQUIRRELVM v,SQUnsignedInteger size))
  52. SQUIRREL_API_FUNC(void, newtable, (HSQUIRRELVM v))
  53. SQUIRREL_API_FUNC(void, newtableex, (HSQUIRRELVM v,SQInteger initialcapacity))
  54. SQUIRREL_API_FUNC(void, newarray, (HSQUIRRELVM v,SQInteger size))
  55. SQUIRREL_API_FUNC(void, newclosure, (HSQUIRRELVM v,SQFUNCTION func,SQUnsignedInteger nfreevars))
  56. SQUIRREL_API_FUNC(SQRESULT, setparamscheck, (HSQUIRRELVM v,SQInteger nparamscheck,const SQChar *typemask))
  57. SQUIRREL_API_FUNC(SQRESULT, setfenv, (HSQUIRRELVM v,SQInteger idx, SQBool cloning))
  58. SQUIRREL_API_FUNC(SQRESULT, getfenv, (HSQUIRRELVM v,SQInteger idx, SQBool roottable_when_null))
  59. SQUIRREL_API_FUNC(SQRESULT, bindenv, (HSQUIRRELVM v,SQInteger idx))
  60. SQUIRREL_API_FUNC(SQRESULT, setclosureroot, (HSQUIRRELVM v,SQInteger idx))
  61. SQUIRREL_API_FUNC(SQRESULT, getclosureroot, (HSQUIRRELVM v,SQInteger idx))
  62. SQUIRREL_API_FUNC(void, pushstring, (HSQUIRRELVM v,const SQChar *s,SQInteger len))
  63. SQUIRREL_API_FUNC(void, pushfstring, (HSQUIRRELVM v,const SQChar *fmt, ...))
  64. SQUIRREL_API_FUNC(void, pushfloat, (HSQUIRRELVM v,SQFloat f))
  65. SQUIRREL_API_FUNC(void, pushinteger, (HSQUIRRELVM v,SQInteger n))
  66. SQUIRREL_API_FUNC(void, pushbool, (HSQUIRRELVM v,SQBool b))
  67. SQUIRREL_API_FUNC(void, pushuserpointer, (HSQUIRRELVM v,SQUserPointer p))
  68. SQUIRREL_API_FUNC(void, pushnull, (HSQUIRRELVM v))
  69. SQUIRREL_API_FUNC(void, pushthread, (HSQUIRRELVM v, HSQUIRRELVM thread))
  70. SQUIRREL_API_FUNC(SQRESULT, checkoption, (HSQUIRRELVM v, SQInteger narg, const SQChar *def,
  71. const SQChar *const lst[]))
  72. SQUIRREL_API_FUNC(SQObjectType, gettype, (HSQUIRRELVM v,SQInteger idx))
  73. SQUIRREL_API_FUNC(const SQChar*, gettypename, (HSQUIRRELVM v,SQInteger idx))
  74. SQUIRREL_API_FUNC(SQRESULT, typeof, (HSQUIRRELVM v,SQInteger idx))
  75. SQUIRREL_API_FUNC(SQInteger, getsize, (HSQUIRRELVM v,SQInteger idx))
  76. SQUIRREL_API_FUNC(SQHash, gethash, (HSQUIRRELVM v, SQInteger idx))
  77. SQUIRREL_API_FUNC(SQRESULT, getbase, (HSQUIRRELVM v,SQInteger idx))
  78. SQUIRREL_API_FUNC(SQBool, instanceof, (HSQUIRRELVM v))
  79. SQUIRREL_API_FUNC(SQRESULT, tostring, (HSQUIRRELVM v,SQInteger idx))
  80. SQUIRREL_API_FUNC(SQRESULT, tobool, (HSQUIRRELVM v, SQInteger idx))
  81. SQUIRREL_API_FUNC(SQRESULT, tointeger, (HSQUIRRELVM v, SQInteger idx))
  82. SQUIRREL_API_FUNC(SQRESULT, tofloat, (HSQUIRRELVM v, SQInteger idx))
  83. SQUIRREL_API_FUNC(SQRESULT, getstring, (HSQUIRRELVM v,SQInteger idx,const SQChar **c))
  84. SQUIRREL_API_FUNC(SQRESULT, getstr_and_size, (HSQUIRRELVM v,SQInteger idx,const SQChar **c, SQInteger *size))
  85. SQUIRREL_API_FUNC(SQRESULT, getinteger, (HSQUIRRELVM v,SQInteger idx,SQInteger *i))
  86. SQUIRREL_API_FUNC(SQRESULT, getinteger_ptr, (HSQUIRRELVM v,SQInteger idx,SQInteger **i))
  87. SQUIRREL_API_FUNC(SQRESULT, getfloat, (HSQUIRRELVM v,SQInteger idx,SQFloat *f))
  88. SQUIRREL_API_FUNC(SQRESULT, getfloat_ptr, (HSQUIRRELVM v,SQInteger idx,SQFloat **f))
  89. SQUIRREL_API_FUNC(SQRESULT, getbool, (HSQUIRRELVM v,SQInteger idx,SQBool *b))
  90. SQUIRREL_API_FUNC(SQRESULT, getthread, (HSQUIRRELVM v,SQInteger idx,HSQUIRRELVM *thread))
  91. SQUIRREL_API_FUNC(SQRESULT, getuserpointer, (HSQUIRRELVM v,SQInteger idx,SQUserPointer *p))
  92. SQUIRREL_API_FUNC(SQUserPointer, get_as_userpointer, (HSQUIRRELVM v,SQInteger idx))
  93. SQUIRREL_API_FUNC(SQRESULT, getuserdata, (HSQUIRRELVM v,SQInteger idx,SQUserPointer *p,SQUserPointer *typetag))
  94. SQUIRREL_API_FUNC(SQRESULT, settypetag, (HSQUIRRELVM v,SQInteger idx,SQUserPointer typetag))
  95. SQUIRREL_API_FUNC(SQRESULT, gettypetag, (HSQUIRRELVM v,SQInteger idx,SQUserPointer *typetag))
  96. SQUIRREL_API_FUNC(void, setreleasehook, (HSQUIRRELVM v,SQInteger idx,SQRELEASEHOOK hook))
  97. SQUIRREL_API_FUNC(SQRELEASEHOOK, getreleasehook, (HSQUIRRELVM v,SQInteger idx))
  98. SQUIRREL_API_FUNC(SQChar*, getscratchpad, (HSQUIRRELVM v,SQInteger minsize))
  99. SQUIRREL_API_FUNC(SQRESULT, getfunctioninfo, (HSQUIRRELVM v,SQInteger level,SQFunctionInfo *fi))
  100. SQUIRREL_API_FUNC(SQRESULT, getclosureinfo, (HSQUIRRELVM v,SQInteger idx,SQUnsignedInteger *nparams,SQUnsignedInteger *nfreevars))
  101. SQUIRREL_API_FUNC(SQRESULT, getclosurename, (HSQUIRRELVM v,SQInteger idx))
  102. SQUIRREL_API_FUNC(SQRESULT, setnativeclosurename, (HSQUIRRELVM v,SQInteger idx,const SQChar *name))
  103. SQUIRREL_API_FUNC(SQRESULT, setinstanceup, (HSQUIRRELVM v, SQInteger idx, SQUserPointer p))
  104. SQUIRREL_API_FUNC(SQRESULT, getinstanceup, (HSQUIRRELVM v, SQInteger idx, SQUserPointer *p,SQUserPointer typetag))
  105. SQUIRREL_API_FUNC(SQRESULT, setclassudsize, (HSQUIRRELVM v, SQInteger idx, SQInteger udsize))
  106. SQUIRREL_API_FUNC(SQRESULT, newclass, (HSQUIRRELVM v,SQBool hasbase))
  107. SQUIRREL_API_FUNC(SQRESULT, pushnewclass, (HSQUIRRELVM v, const SQChar *className,
  108. const SQChar *parentName,
  109. void *classTag, SQRegFunction *methods, SQBool leaveOnTop))
  110. SQUIRREL_API_FUNC(SQRESULT, createinstance, (HSQUIRRELVM v,SQInteger idx))
  111. SQUIRREL_API_FUNC(SQRESULT, setattributes, (HSQUIRRELVM v,SQInteger idx))
  112. SQUIRREL_API_FUNC(SQRESULT, getattributes, (HSQUIRRELVM v,SQInteger idx))
  113. SQUIRREL_API_FUNC(SQRESULT, getclass, (HSQUIRRELVM v,SQInteger idx))
  114. SQUIRREL_API_FUNC(void, weakref, (HSQUIRRELVM v,SQInteger idx))
  115. SQUIRREL_API_FUNC(SQRESULT, getdefaultdelegate, (HSQUIRRELVM v,SQObjectType t))
  116. SQUIRREL_API_FUNC(SQRESULT, getmemberhandle, (HSQUIRRELVM v,SQInteger idx,HSQMEMBERHANDLE *handle))
  117. SQUIRREL_API_FUNC(SQRESULT, getbyhandle, (HSQUIRRELVM v,SQInteger idx,const HSQMEMBERHANDLE *handle))
  118. SQUIRREL_API_FUNC(SQRESULT, setbyhandle, (HSQUIRRELVM v,SQInteger idx,const HSQMEMBERHANDLE *handle))
  119. SQUIRREL_API_FUNC(void, insertfunc, (HSQUIRRELVM sqvm, const SQChar *fname, SQFUNCTION func,
  120. SQInteger nparamscheck, const SQChar *typemask, SQBool isStatic))
  121. SQUIRREL_API_FUNC(void, insert_reg_funcs, (HSQUIRRELVM sqvm, SQRegFunction *obj_funcs))
  122. //SQUIRREL_API_FUNC(const SQChar*, optstring, (HSQUIRRELVM sqvm, SQInteger idx, const SQChar *dflt, SQInteger *size))
  123. SQUIRREL_API_FUNC(SQRESULT, optinteger, (HSQUIRRELVM sqvm, SQInteger idx, SQInteger *value, SQInteger default_value))
  124. /*object manipulation*/
  125. SQUIRREL_API_FUNC(void, pushroottable, (HSQUIRRELVM v))
  126. SQUIRREL_API_FUNC(SQRESULT, getonroottable, (HSQUIRRELVM v))
  127. SQUIRREL_API_FUNC(SQRESULT, setonroottable, (HSQUIRRELVM v))
  128. SQUIRREL_API_FUNC(void, pushregistrytable, (HSQUIRRELVM v))
  129. SQUIRREL_API_FUNC(SQRESULT, getonregistrytable, (HSQUIRRELVM v))
  130. SQUIRREL_API_FUNC(SQRESULT, setonregistrytable, (HSQUIRRELVM v))
  131. SQUIRREL_API_FUNC(SQRESULT, delete_on_registry_table, (HSQUIRRELVM v, SQUserPointer uptr))
  132. SQUIRREL_API_FUNC(void, pushconsttable, (HSQUIRRELVM v))
  133. SQUIRREL_API_FUNC(SQRESULT, setroottable, (HSQUIRRELVM v))
  134. SQUIRREL_API_FUNC(SQRESULT, setconsttable, (HSQUIRRELVM v))
  135. SQUIRREL_API_FUNC(SQRESULT, newslot, (HSQUIRRELVM v, SQInteger idx, SQBool bstatic))
  136. SQUIRREL_API_FUNC(SQRESULT, deleteslot, (HSQUIRRELVM v,SQInteger idx,SQBool pushval))
  137. SQUIRREL_API_FUNC(SQRESULT, set, (HSQUIRRELVM v,SQInteger idx))
  138. SQUIRREL_API_FUNC(SQRESULT, get, (HSQUIRRELVM v,SQInteger idx))
  139. SQUIRREL_API_FUNC(SQRESULT, getbyname, (HSQUIRRELVM v,SQInteger idx, const SQChar *key, SQInteger key_len))
  140. SQUIRREL_API_FUNC(SQRESULT, rawget, (HSQUIRRELVM v,SQInteger idx))
  141. SQUIRREL_API_FUNC(SQBool, rawexists, (HSQUIRRELVM v,SQInteger idx))
  142. SQUIRREL_API_FUNC(SQRESULT, rawset, (HSQUIRRELVM v,SQInteger idx))
  143. SQUIRREL_API_FUNC(SQRESULT, rawdeleteslot, (HSQUIRRELVM v,SQInteger idx,SQBool pushval))
  144. SQUIRREL_API_FUNC(SQRESULT, newmember, (HSQUIRRELVM v,SQInteger idx,SQBool bstatic))
  145. SQUIRREL_API_FUNC(SQRESULT, rawnewmember, (HSQUIRRELVM v,SQInteger idx,SQBool bstatic))
  146. SQUIRREL_API_FUNC(SQRESULT, arrayappend, (HSQUIRRELVM v,SQInteger idx))
  147. SQUIRREL_API_FUNC(SQRESULT, arraypop, (HSQUIRRELVM v,SQInteger idx,SQBool pushval))
  148. SQUIRREL_API_FUNC(SQRESULT, arrayresize, (HSQUIRRELVM v,SQInteger idx,SQInteger newsize))
  149. SQUIRREL_API_FUNC(SQRESULT, arrayminsize, (HSQUIRRELVM v,SQInteger idx,SQInteger minsize))
  150. SQUIRREL_API_FUNC(SQRESULT, arrayreverse, (HSQUIRRELVM v,SQInteger idx))
  151. SQUIRREL_API_FUNC(SQRESULT, arrayremove, (HSQUIRRELVM v,SQInteger idx,SQInteger itemidx))
  152. SQUIRREL_API_FUNC(SQRESULT, arrayinsert, (HSQUIRRELVM v,SQInteger idx,SQInteger destpos))
  153. SQUIRREL_API_FUNC(SQRESULT, arrayget, (HSQUIRRELVM v,SQInteger idx,SQInteger pos))
  154. SQUIRREL_API_FUNC(SQRESULT, arrayset, (HSQUIRRELVM v,SQInteger idx,SQInteger destpos))
  155. SQUIRREL_API_FUNC(SQRESULT, setdelegate, (HSQUIRRELVM v,SQInteger idx))
  156. SQUIRREL_API_FUNC(SQRESULT, getdelegate, (HSQUIRRELVM v,SQInteger idx))
  157. SQUIRREL_API_FUNC(SQRESULT, clone, (HSQUIRRELVM v,SQInteger idx))
  158. SQUIRREL_API_FUNC(SQRESULT, setfreevariable, (HSQUIRRELVM v,SQInteger idx,SQUnsignedInteger nval))
  159. SQUIRREL_API_FUNC(SQRESULT, next, (HSQUIRRELVM v,SQInteger idx))
  160. SQUIRREL_API_FUNC(SQRESULT, getweakrefval, (HSQUIRRELVM v,SQInteger idx))
  161. SQUIRREL_API_FUNC(SQRESULT, clear, (HSQUIRRELVM v,SQInteger idx))
  162. /*calls*/
  163. SQUIRREL_API_FUNC(SQRESULT, call, (HSQUIRRELVM v,SQInteger params,SQBool retval,SQBool raiseerror))
  164. SQUIRREL_API_FUNC(SQRESULT, call_va_vl, (HSQUIRRELVM v, SQBool reset_stack, SQInteger idx, const SQChar *func,
  165. SQInteger idx_this, const SQChar *sig, va_list vl))
  166. SQUIRREL_API_FUNC(SQRESULT, call_va, (HSQUIRRELVM v, SQBool reset_stack, SQInteger idx, const SQChar *func,
  167. SQInteger idx_this, const SQChar *sig, ...))
  168. SQUIRREL_API_FUNC(SQRESULT, resume, (HSQUIRRELVM v,SQBool retval,SQBool raiseerror))
  169. SQUIRREL_API_FUNC(const SQChar*, getlocal, (HSQUIRRELVM v,SQUnsignedInteger level,SQUnsignedInteger idx))
  170. SQUIRREL_API_FUNC(SQRESULT, getcallee, (HSQUIRRELVM v))
  171. SQUIRREL_API_FUNC(const SQChar*, getfreevariable, (HSQUIRRELVM v,SQInteger idx,SQUnsignedInteger nval))
  172. SQUIRREL_API_FUNC(SQRESULT, throwerror, (HSQUIRRELVM v,const SQChar *fmt, ...))
  173. SQUIRREL_API_FUNC(SQRESULT, throwobject, (HSQUIRRELVM v))
  174. SQUIRREL_API_FUNC(void, reseterror, (HSQUIRRELVM v))
  175. SQUIRREL_API_FUNC(void, getlasterror, (HSQUIRRELVM v))
  176. SQUIRREL_API_FUNC(const SQChar*, getlasterror_str, (HSQUIRRELVM v))
  177. SQUIRREL_API_FUNC(void, getlasterror_line_col, (HSQUIRRELVM v, SQInteger *line, SQInteger *column))
  178. /*raw object handling*/
  179. SQUIRREL_API_FUNC(SQRESULT, getstackobj, (HSQUIRRELVM v,SQInteger idx,HSQOBJECT *po))
  180. SQUIRREL_API_FUNC(void, pushobject, (HSQUIRRELVM v,HSQOBJECT obj))
  181. SQUIRREL_API_FUNC(void, addref, (HSQUIRRELVM v,HSQOBJECT *po))
  182. SQUIRREL_API_FUNC(SQBool, release, (HSQUIRRELVM v,HSQOBJECT *po))
  183. SQUIRREL_API_FUNC(SQUnsignedInteger, getrefcount, (HSQUIRRELVM v,HSQOBJECT *po))
  184. SQUIRREL_API_FUNC(void, resetobject, (HSQOBJECT *po))
  185. SQUIRREL_API_FUNC(const SQChar*,objtostring, (const HSQOBJECT *o))
  186. SQUIRREL_API_FUNC(SQBool, objtobool, (const HSQOBJECT *o))
  187. SQUIRREL_API_FUNC(SQInteger, objtointeger, (const HSQOBJECT *o))
  188. SQUIRREL_API_FUNC(SQFloat, objtofloat, (const HSQOBJECT *o))
  189. SQUIRREL_API_FUNC(SQUserPointer, objtouserpointer, (const HSQOBJECT *o))
  190. SQUIRREL_API_FUNC(SQRESULT, getobjtypetag, (const HSQOBJECT *o,SQUserPointer * typetag))
  191. SQUIRREL_API_FUNC(SQUnsignedInteger, getvmrefcount, (HSQUIRRELVM v, const HSQOBJECT *po))
  192. /*GC*/
  193. SQUIRREL_API_FUNC(SQInteger, collectgarbage, (HSQUIRRELVM v))
  194. SQUIRREL_API_FUNC(SQRESULT, resurrectunreachable, (HSQUIRRELVM v))
  195. /*serialization*/
  196. SQUIRREL_API_FUNC(SQRESULT, writeclosure, (HSQUIRRELVM vm,SQWRITEFUNC writef,SQUserPointer up))
  197. SQUIRREL_API_FUNC(SQRESULT, writeclosure_as_source, (HSQUIRRELVM vm,SQWRITEFUNC writef,SQUserPointer up))
  198. SQUIRREL_API_FUNC(SQRESULT, readclosure, (HSQUIRRELVM vm,SQREADFUNC readf,SQUserPointer up))
  199. /*mem allocation*/
  200. SQUIRREL_API_FUNC(void*, malloc, (SQUnsignedInteger size))
  201. SQUIRREL_API_FUNC(void*, realloc, (void* p,SQUnsignedInteger oldsize,SQUnsignedInteger newsize))
  202. SQUIRREL_API_FUNC(void, free, (void *p,SQUnsignedInteger size))
  203. /*debug*/
  204. SQUIRREL_API_FUNC(SQRESULT, stackinfos, (HSQUIRRELVM v,SQInteger level,SQStackInfos *si))
  205. SQUIRREL_API_FUNC(void, setdebughook, (HSQUIRRELVM v))
  206. SQUIRREL_API_FUNC(void, setnativedebughook, (HSQUIRRELVM v,SQDEBUGHOOK hook))
  207. SQUIRREL_API_FUNC(SQInteger, getfulltop, (HSQUIRRELVM v))
  208. SQUIRREL_API_FUNC(void, getlaststackinfo, (HSQUIRRELVM v))