1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Updated the Squirrel and Sqrat libraries to the latest development versions.

This commit is contained in:
Sandu Liviu Catalin 2016-05-22 22:51:59 +03:00
parent 40a2ba46f5
commit 6822172f6a
18 changed files with 283 additions and 219 deletions

View File

@ -165,6 +165,7 @@
<Add option="-fno-rtti" /> <Add option="-fno-rtti" />
<Add option="-fno-strict-aliasing" /> <Add option="-fno-strict-aliasing" />
<Add option="-Wno-unused-variable" /> <Add option="-Wno-unused-variable" />
<Add option="-Wno-unused-but-set-variable" />
<Add option="-DGARBAGE_COLLECTOR" /> <Add option="-DGARBAGE_COLLECTOR" />
<Add directory="../include" /> <Add directory="../include" />
<Add directory="../config/common" /> <Add directory="../config/common" />

View File

@ -1,4 +1,4 @@
Copyright (c) 2003-2015 Alberto Demichelis Copyright (c) 2003-2016 Alberto Demichelis
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -103,10 +103,10 @@ static SQInteger _sqstd_aux_printerror(HSQUIRRELVM v)
const SQChar *sErr = 0; const SQChar *sErr = 0;
if(sq_gettop(v)>=1) { if(sq_gettop(v)>=1) {
if(SQ_SUCCEEDED(sq_getstring(v,2,&sErr))) { if(SQ_SUCCEEDED(sq_getstring(v,2,&sErr))) {
pf(v,_SC("\nAN ERROR HAS OCCURED [%s]\n"),sErr); pf(v,_SC("\nAN ERROR HAS OCCURRED [%s]\n"),sErr);
} }
else{ else{
pf(v,_SC("\nAN ERROR HAS OCCURED [unknown]\n")); pf(v,_SC("\nAN ERROR HAS OCCURRED [unknown]\n"));
} }
sqstd_printcallstack(v); sqstd_printcallstack(v);
} }

View File

@ -372,7 +372,7 @@ SQRESULT sqstd_loadfile(HSQUIRRELVM v,const SQChar *filename,SQBool printerror)
} }
if(uc != 0xBF) { if(uc != 0xBF) {
sqstd_fclose(file); sqstd_fclose(file);
return sq_throwerror(v,_SC("Unrecognozed ecoding")); return sq_throwerror(v,_SC("Unrecognized encoding"));
} }
#ifdef SQUNICODE #ifdef SQUNICODE
func = _io_file_lexfeed_UTF8; func = _io_file_lexfeed_UTF8;
@ -399,6 +399,10 @@ SQRESULT sqstd_loadfile(HSQUIRRELVM v,const SQChar *filename,SQBool printerror)
SQRESULT sqstd_dofile(HSQUIRRELVM v,const SQChar *filename,SQBool retval,SQBool printerror) SQRESULT sqstd_dofile(HSQUIRRELVM v,const SQChar *filename,SQBool retval,SQBool printerror)
{ {
//at least one entry must exist in order for us to push it as the environment
if(sq_gettop(v) == 0)
return sq_throwerror(v,_SC("environment table expected"));
if(SQ_SUCCEEDED(sqstd_loadfile(v,filename,printerror))) { if(SQ_SUCCEEDED(sqstd_loadfile(v,filename,printerror))) {
sq_push(v,-2); sq_push(v,-2);
if(SQ_SUCCEEDED(sq_call(v,1,retval,SQTrue))) { if(SQ_SUCCEEDED(sq_call(v,1,retval,SQTrue))) {

View File

@ -153,6 +153,9 @@ static SQInteger sqstd_rex_charnode(SQRex *exp,SQBool isclass)
exp->_nodes[node].right = ce; exp->_nodes[node].right = ce;
return node; return node;
} }
case 0:
sqstd_rex_error(exp,_SC("letter expected for argument of escape sequence"));
break;
case 'b': case 'b':
case 'B': case 'B':
if(!isclass) { if(!isclass) {

View File

@ -89,7 +89,7 @@ SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen
else { else {
n++; n++;
if( nparam > sq_gettop(v) ) if( nparam > sq_gettop(v) )
return sq_throwerror(v,_SC("not enough paramters for the given format string")); return sq_throwerror(v,_SC("not enough parameters for the given format string"));
n = validate_format(v,fmt,format,n,w); n = validate_format(v,fmt,format,n,w);
if(n < 0) return -1; if(n < 0) return -1;
SQInteger addlen = 0; SQInteger addlen = 0;
@ -150,6 +150,19 @@ SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen
return SQ_OK; return SQ_OK;
} }
static SQInteger _string_printf(HSQUIRRELVM v)
{
SQChar *dest = NULL;
SQInteger length = 0;
if(SQ_FAILED(sqstd_format(v,2,&length,&dest)))
return -1;
SQPRINTFUNCTION printfunc = sq_getprintfunc(v);
if(printfunc) printfunc(v,dest);
return 0;
}
static SQInteger _string_format(HSQUIRRELVM v) static SQInteger _string_format(HSQUIRRELVM v)
{ {
SQChar *dest = NULL; SQChar *dest = NULL;
@ -459,6 +472,7 @@ static const SQRegFunction rexobj_funcs[]={
#define _DECL_FUNC(name,nparams,pmask) {_SC(#name),_string_##name,nparams,pmask} #define _DECL_FUNC(name,nparams,pmask) {_SC(#name),_string_##name,nparams,pmask}
static const SQRegFunction stringlib_funcs[]={ static const SQRegFunction stringlib_funcs[]={
_DECL_FUNC(format,-2,_SC(".s")), _DECL_FUNC(format,-2,_SC(".s")),
_DECL_FUNC(printf,-2,_SC(".s")),
_DECL_FUNC(strip,2,_SC(".s")), _DECL_FUNC(strip,2,_SC(".s")),
_DECL_FUNC(lstrip,2,_SC(".s")), _DECL_FUNC(lstrip,2,_SC(".s")),
_DECL_FUNC(rstrip,2,_SC(".s")), _DECL_FUNC(rstrip,2,_SC(".s")),

View File

@ -680,6 +680,15 @@ SQRESULT sq_getbool(HSQUIRRELVM v,SQInteger idx,SQBool *b)
return SQ_ERROR; return SQ_ERROR;
} }
SQRESULT sq_getstringandsize(HSQUIRRELVM v,SQInteger idx,const SQChar **c,SQInteger *size)
{
SQObjectPtr *o = NULL;
_GETSAFE_OBJ(v, idx, OT_STRING,o);
*c = _stringval(*o);
*size = _string(*o)->_len;
return SQ_OK;
}
SQRESULT sq_getstring(HSQUIRRELVM v,SQInteger idx,const SQChar **c) SQRESULT sq_getstring(HSQUIRRELVM v,SQInteger idx,const SQChar **c)
{ {
SQObjectPtr *o = NULL; SQObjectPtr *o = NULL;
@ -1199,29 +1208,24 @@ SQRESULT sq_wakeupvm(HSQUIRRELVM v,SQBool wakeupret,SQBool retval,SQBool raiseer
void sq_setreleasehook(HSQUIRRELVM v,SQInteger idx,SQRELEASEHOOK hook) void sq_setreleasehook(HSQUIRRELVM v,SQInteger idx,SQRELEASEHOOK hook)
{ {
if(sq_gettop(v) >= 1){
SQObjectPtr &ud=stack_get(v,idx); SQObjectPtr &ud=stack_get(v,idx);
switch( type(ud) ) { switch( type(ud) ) {
case OT_USERDATA: _userdata(ud)->_hook = hook; break; case OT_USERDATA: _userdata(ud)->_hook = hook; break;
case OT_INSTANCE: _instance(ud)->_hook = hook; break; case OT_INSTANCE: _instance(ud)->_hook = hook; break;
case OT_CLASS: _class(ud)->_hook = hook; break; case OT_CLASS: _class(ud)->_hook = hook; break;
default: break; //shutup compiler default: return;
}
} }
} }
SQRELEASEHOOK sq_getreleasehook(HSQUIRRELVM v,SQInteger idx) SQRELEASEHOOK sq_getreleasehook(HSQUIRRELVM v,SQInteger idx)
{ {
if(sq_gettop(v) >= 1){
SQObjectPtr &ud=stack_get(v,idx); SQObjectPtr &ud=stack_get(v,idx);
switch( type(ud) ) { switch( type(ud) ) {
case OT_USERDATA: return _userdata(ud)->_hook; break; case OT_USERDATA: return _userdata(ud)->_hook; break;
case OT_INSTANCE: return _instance(ud)->_hook; break; case OT_INSTANCE: return _instance(ud)->_hook; break;
case OT_CLASS: return _class(ud)->_hook; break; case OT_CLASS: return _class(ud)->_hook; break;
default: break; //shutup compiler default: return NULL;
} }
}
return NULL;
} }
void sq_setcompilererrorhandler(HSQUIRRELVM v,SQCOMPILERERROR f) void sq_setcompilererrorhandler(HSQUIRRELVM v,SQCOMPILERERROR f)

View File

@ -17,12 +17,13 @@ static bool str2num(const SQChar *s,SQObjectPtr &res,SQInteger base)
{ {
SQChar *end; SQChar *end;
const SQChar *e = s; const SQChar *e = s;
SQBool isfloat = SQFalse; bool iseintbase = base > 13; //to fix error converting hexadecimals with e like 56f0791e
bool isfloat = false;
SQChar c; SQChar c;
while((c = *e) != _SC('\0')) while((c = *e) != _SC('\0'))
{ {
if(c == _SC('.') || c == _SC('E')|| c == _SC('e')) { //e and E is for scientific notation if (c == _SC('.') || (!iseintbase && (c == _SC('E') || c == _SC('e')))) { //e and E is for scientific notation
isfloat = SQTrue; isfloat = true;
break; break;
} }
e++; e++;

View File

@ -389,7 +389,7 @@ SQInteger SQLexer::ReadString(SQInteger ndelim,bool verbatim)
#if WCHAR_SIZE == 2 #if WCHAR_SIZE == 2
AddUTF16(scstrtoul(temp, &stemp, 16)); AddUTF16(scstrtoul(temp, &stemp, 16));
#else #else
ADD_CHAR((SQChar)scstrtoul(temp, &stemp, 16)); APPEND_CHAR((SQChar)scstrtoul(temp, &stemp, 16));
#endif #endif
#else #else
AddUTF8(scstrtoul(temp, &stemp, 16)); AddUTF8(scstrtoul(temp, &stemp, 16));

View File

@ -12,12 +12,6 @@
#include "squserdata.h" #include "squserdata.h"
#include "sqclass.h" #include "sqclass.h"
//SQObjectPtr _null_;
//SQObjectPtr _true_(true);
//SQObjectPtr _false_(false);
//SQObjectPtr _one_((SQInteger)1);
//SQObjectPtr _minusone_((SQInteger)-1);
SQSharedState::SQSharedState() SQSharedState::SQSharedState()
{ {
_compilererrorhandler = NULL; _compilererrorhandler = NULL;
@ -41,11 +35,9 @@ SQSharedState::SQSharedState()
bool CompileTypemask(SQIntVec &res,const SQChar *typemask) bool CompileTypemask(SQIntVec &res,const SQChar *typemask)
{ {
SQInteger i = 0; SQInteger i = 0;
SQInteger mask = 0; SQInteger mask = 0;
while(typemask[i] != 0) { while(typemask[i] != 0) {
switch(typemask[i]) {
switch(typemask[i]){
case 'o': mask |= _RT_NULL; break; case 'o': mask |= _RT_NULL; break;
case 'i': mask |= _RT_INTEGER; break; case 'i': mask |= _RT_INTEGER; break;
case 'f': mask |= _RT_FLOAT; break; case 'f': mask |= _RT_FLOAT; break;
@ -160,7 +152,6 @@ void SQSharedState::Init()
_class_default_delegate = CreateDefaultDelegate(this,_class_default_delegate_funcz); _class_default_delegate = CreateDefaultDelegate(this,_class_default_delegate_funcz);
_instance_default_delegate = CreateDefaultDelegate(this,_instance_default_delegate_funcz); _instance_default_delegate = CreateDefaultDelegate(this,_instance_default_delegate_funcz);
_weakref_default_delegate = CreateDefaultDelegate(this,_weakref_default_delegate_funcz); _weakref_default_delegate = CreateDefaultDelegate(this,_weakref_default_delegate_funcz);
} }
SQSharedState::~SQSharedState() SQSharedState::~SQSharedState()
@ -282,7 +273,6 @@ SQInteger SQSharedState::ResurrectUnreachable(SQVM *vm)
SQCollectable *resurrected = _gc_chain; SQCollectable *resurrected = _gc_chain;
SQCollectable *t = resurrected; SQCollectable *t = resurrected;
//SQCollectable *nx = NULL;
_gc_chain = tchain; _gc_chain = tchain;

View File

@ -15,6 +15,8 @@
#include "sqclass.h" #include "sqclass.h"
#define TOP() (_stack._vals[_top-1]) #define TOP() (_stack._vals[_top-1])
#define TARGET _stack._vals[_stackbase+arg0]
#define STK(a) _stack._vals[_stackbase+(a)]
bool SQVM::BW_OP(SQUnsignedInteger op,SQObjectPtr &trg,const SQObjectPtr &o1,const SQObjectPtr &o2) bool SQVM::BW_OP(SQUnsignedInteger op,SQObjectPtr &trg,const SQObjectPtr &o1,const SQObjectPtr &o2)
{ {
@ -301,7 +303,7 @@ bool SQVM::ToString(const SQObjectPtr &o,SQObjectPtr &res)
SQObjectPtr closure; SQObjectPtr closure;
if(_delegable(o)->GetMetaMethod(this, MT_TOSTRING, closure)) { if(_delegable(o)->GetMetaMethod(this, MT_TOSTRING, closure)) {
Push(o); Push(o);
if(CallMetaMethod(closure,MT_TOSTRING,1,res)) {; if(CallMetaMethod(closure,MT_TOSTRING,1,res)) {
if(type(res) == OT_STRING) if(type(res) == OT_STRING)
return true; return true;
} }
@ -1367,9 +1369,8 @@ SQInteger SQVM::FallBackSet(const SQObjectPtr &self,const SQObjectPtr &key,const
return FALLBACK_OK; return FALLBACK_OK;
} }
else { else {
if(type(_lasterror) != OT_NULL) { //NULL means "clean failure" (not found)
//error
Pop(3); Pop(3);
if(type(_lasterror) != OT_NULL) { //NULL means "clean failure" (not found)
return FALLBACK_ERROR; return FALLBACK_ERROR;
} }
} }

View File

@ -28,9 +28,6 @@ struct SQExceptionTrap{
#define _INLINE #define _INLINE
#define STK(a) _stack._vals[_stackbase+(a)]
#define TARGET _stack._vals[_stackbase+arg0]
typedef sqvector<SQExceptionTrap> ExceptionsTraps; typedef sqvector<SQExceptionTrap> ExceptionsTraps;
struct SQVM : public CHAINABLE_OBJ struct SQVM : public CHAINABLE_OBJ

View File

@ -281,6 +281,44 @@ public:
#endif #endif
} }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Checks if the object has a slot with a specified key
///
/// \param key Name of the key
///
/// \return True if the Object has a value associated with key, otherwise false
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool HasKey(const SQChar* key) const {
sq_pushobject(vm, GetObject());
sq_pushstring(vm, key, -1);
if (SQ_FAILED(sq_get(vm, -2))) {
sq_pop(vm, 1);
return false;
}
sq_pop(vm, 2);
return true;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Checks if the object has a slot with a specified index
///
/// \param index Index to check
///
/// \return True if the Object has a value associated with index, otherwise false
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool HasKey(SQInteger index) const {
sq_pushobject(vm, GetObject());
sq_pushinteger(vm, index);
if (SQ_FAILED(sq_get(vm, -2))) {
sq_pop(vm, 1);
return false;
}
sq_pop(vm, 2);
return true;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Casts the object to a certain C++ type /// Casts the object to a certain C++ type
/// ///

View File

@ -7,6 +7,7 @@
#define SQSTD_STREAM_TYPE_TAG 0x80000000 #define SQSTD_STREAM_TYPE_TAG 0x80000000
struct SQStream { struct SQStream {
virtual ~SQStream() {}
virtual SQInteger Read(void *buffer, SQInteger size) = 0; virtual SQInteger Read(void *buffer, SQInteger size) = 0;
virtual SQInteger Write(void *buffer, SQInteger size) = 0; virtual SQInteger Write(void *buffer, SQInteger size) = 0;
virtual SQInteger Flush() = 0; virtual SQInteger Flush() = 0;

View File

@ -1,5 +1,5 @@
/* /*
Copyright (c) 2003-2014 Alberto Demichelis Copyright (c) 2003-2016 Alberto Demichelis
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
@ -62,7 +62,7 @@ struct SQOuter;
#include "sqconfig.h" #include "sqconfig.h"
#define SQUIRREL_VERSION _SC("Squirrel 3.1 stable") #define SQUIRREL_VERSION _SC("Squirrel 3.1 stable")
#define SQUIRREL_COPYRIGHT _SC("Copyright (C) 2003-2015 Alberto Demichelis") #define SQUIRREL_COPYRIGHT _SC("Copyright (C) 2003-2016 Alberto Demichelis")
#define SQUIRREL_AUTHOR _SC("Alberto Demichelis") #define SQUIRREL_AUTHOR _SC("Alberto Demichelis")
#define SQUIRREL_VERSION_NUMBER 310 #define SQUIRREL_VERSION_NUMBER 310
@ -195,6 +195,7 @@ typedef struct tagSQFunctionInfo {
}SQFunctionInfo; }SQFunctionInfo;
#ifndef SQMOD_PLUGIN_API #ifndef SQMOD_PLUGIN_API
/*vm*/ /*vm*/
SQUIRREL_API HSQUIRRELVM sq_open(SQInteger initialstacksize); SQUIRREL_API HSQUIRRELVM sq_open(SQInteger initialstacksize);
SQUIRREL_API HSQUIRRELVM sq_newthread(HSQUIRRELVM friendvm, SQInteger initialstacksize); SQUIRREL_API HSQUIRRELVM sq_newthread(HSQUIRRELVM friendvm, SQInteger initialstacksize);
@ -259,6 +260,7 @@ SQUIRREL_API SQRESULT sq_getbase(HSQUIRRELVM v,SQInteger idx);
SQUIRREL_API SQBool sq_instanceof(HSQUIRRELVM v); SQUIRREL_API SQBool sq_instanceof(HSQUIRRELVM v);
SQUIRREL_API SQRESULT sq_tostring(HSQUIRRELVM v,SQInteger idx); SQUIRREL_API SQRESULT sq_tostring(HSQUIRRELVM v,SQInteger idx);
SQUIRREL_API void sq_tobool(HSQUIRRELVM v, SQInteger idx, SQBool *b); SQUIRREL_API void sq_tobool(HSQUIRRELVM v, SQInteger idx, SQBool *b);
SQUIRREL_API SQRESULT sq_getstringandsize(HSQUIRRELVM v,SQInteger idx,const SQChar **c,SQInteger *size);
SQUIRREL_API SQRESULT sq_getstring(HSQUIRRELVM v,SQInteger idx,const SQChar **c); SQUIRREL_API SQRESULT sq_getstring(HSQUIRRELVM v,SQInteger idx,const SQChar **c);
SQUIRREL_API SQRESULT sq_getinteger(HSQUIRRELVM v,SQInteger idx,SQInteger *i); SQUIRREL_API SQRESULT sq_getinteger(HSQUIRRELVM v,SQInteger idx,SQInteger *i);
SQUIRREL_API SQRESULT sq_getfloat(HSQUIRRELVM v,SQInteger idx,SQFloat *f); SQUIRREL_API SQRESULT sq_getfloat(HSQUIRRELVM v,SQInteger idx,SQFloat *f);
@ -362,6 +364,7 @@ SQUIRREL_API void sq_free(void *p,SQUnsignedInteger size);
SQUIRREL_API SQRESULT sq_stackinfos(HSQUIRRELVM v,SQInteger level,SQStackInfos *si); SQUIRREL_API SQRESULT sq_stackinfos(HSQUIRRELVM v,SQInteger level,SQStackInfos *si);
SQUIRREL_API void sq_setdebughook(HSQUIRRELVM v); SQUIRREL_API void sq_setdebughook(HSQUIRRELVM v);
SQUIRREL_API void sq_setnativedebughook(HSQUIRRELVM v,SQDEBUGHOOK hook); SQUIRREL_API void sq_setnativedebughook(HSQUIRRELVM v,SQDEBUGHOOK hook);
#endif // SQMOD_PLUGIN_API #endif // SQMOD_PLUGIN_API
/*UTILITY MACRO*/ /*UTILITY MACRO*/

View File

@ -98,6 +98,7 @@ extern "C" {
typedef SQBool (*sqapi_instanceof)(HSQUIRRELVM v); typedef SQBool (*sqapi_instanceof)(HSQUIRRELVM v);
typedef SQRESULT (*sqapi_tostring)(HSQUIRRELVM v,SQInteger idx); typedef SQRESULT (*sqapi_tostring)(HSQUIRRELVM v,SQInteger idx);
typedef void (*sqapi_tobool)(HSQUIRRELVM v, SQInteger idx, SQBool *b); typedef void (*sqapi_tobool)(HSQUIRRELVM v, SQInteger idx, SQBool *b);
typedef SQRESULT (*sqapi_getstringandsize)(HSQUIRRELVM v,SQInteger idx,const SQChar **c,SQInteger *size);
typedef SQRESULT (*sqapi_getstring)(HSQUIRRELVM v,SQInteger idx,const SQChar **c); typedef SQRESULT (*sqapi_getstring)(HSQUIRRELVM v,SQInteger idx,const SQChar **c);
typedef SQRESULT (*sqapi_getinteger)(HSQUIRRELVM v,SQInteger idx,SQInteger *i); typedef SQRESULT (*sqapi_getinteger)(HSQUIRRELVM v,SQInteger idx,SQInteger *i);
typedef SQRESULT (*sqapi_getfloat)(HSQUIRRELVM v,SQInteger idx,SQFloat *f); typedef SQRESULT (*sqapi_getfloat)(HSQUIRRELVM v,SQInteger idx,SQFloat *f);
@ -285,6 +286,7 @@ extern "C" {
sqapi_instanceof instanceof; sqapi_instanceof instanceof;
sqapi_tostring tostring; sqapi_tostring tostring;
sqapi_tobool tobool; sqapi_tobool tobool;
sqapi_getstringandsize getstringandsize;
sqapi_getstring getstring; sqapi_getstring getstring;
sqapi_getinteger getinteger; sqapi_getinteger getinteger;
sqapi_getfloat getfloat; sqapi_getfloat getfloat;
@ -469,6 +471,7 @@ extern "C" {
extern sqapi_instanceof sq_instanceof; extern sqapi_instanceof sq_instanceof;
extern sqapi_tostring sq_tostring; extern sqapi_tostring sq_tostring;
extern sqapi_tobool sq_tobool; extern sqapi_tobool sq_tobool;
extern sqapi_getstringandsize sq_getstringandsize;
extern sqapi_getstring sq_getstring; extern sqapi_getstring sq_getstring;
extern sqapi_getinteger sq_getinteger; extern sqapi_getinteger sq_getinteger;
extern sqapi_getfloat sq_getfloat; extern sqapi_getfloat sq_getfloat;

View File

@ -65,6 +65,7 @@ sqapi_getbase sq_getbase = NULL;
sqapi_instanceof sq_instanceof = NULL; sqapi_instanceof sq_instanceof = NULL;
sqapi_tostring sq_tostring = NULL; sqapi_tostring sq_tostring = NULL;
sqapi_tobool sq_tobool = NULL; sqapi_tobool sq_tobool = NULL;
sqapi_getstringandsize sq_getstringandsize = NULL;
sqapi_getstring sq_getstring = NULL; sqapi_getstring sq_getstring = NULL;
sqapi_getinteger sq_getinteger = NULL; sqapi_getinteger sq_getinteger = NULL;
sqapi_getfloat sq_getfloat = NULL; sqapi_getfloat sq_getfloat = NULL;
@ -277,6 +278,7 @@ SQRESULT sq_api_expand(HSQAPI sqapi)
sq_instanceof = sqapi->instanceof; sq_instanceof = sqapi->instanceof;
sq_tostring = sqapi->tostring; sq_tostring = sqapi->tostring;
sq_tobool = sqapi->tobool; sq_tobool = sqapi->tobool;
sq_getstringandsize = sqapi->getstringandsize;
sq_getstring = sqapi->getstring; sq_getstring = sqapi->getstring;
sq_getinteger = sqapi->getinteger; sq_getinteger = sqapi->getinteger;
sq_getfloat = sqapi->getfloat; sq_getfloat = sqapi->getfloat;
@ -467,6 +469,7 @@ void sq_api_collapse()
sq_instanceof = NULL; sq_instanceof = NULL;
sq_tostring = NULL; sq_tostring = NULL;
sq_tobool = NULL; sq_tobool = NULL;
sq_getstringandsize = NULL;
sq_getstring = NULL; sq_getstring = NULL;
sq_getinteger = NULL; sq_getinteger = NULL;
sq_getfloat = NULL; sq_getfloat = NULL;

View File

@ -348,6 +348,7 @@ void InitExports()
g_SqAPI.instanceof = sq_instanceof; g_SqAPI.instanceof = sq_instanceof;
g_SqAPI.tostring = sq_tostring; g_SqAPI.tostring = sq_tostring;
g_SqAPI.tobool = sq_tobool; g_SqAPI.tobool = sq_tobool;
g_SqAPI.getstringandsize = sq_getstringandsize;
g_SqAPI.getstring = sq_getstring; g_SqAPI.getstring = sq_getstring;
g_SqAPI.getinteger = sq_getinteger; g_SqAPI.getinteger = sq_getinteger;
g_SqAPI.getfloat = sq_getfloat; g_SqAPI.getfloat = sq_getfloat;