1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-07-08 09:57:10 +02: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

@ -15,6 +15,8 @@
#include "sqclass.h"
#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)
{
@ -301,7 +303,7 @@ bool SQVM::ToString(const SQObjectPtr &o,SQObjectPtr &res)
SQObjectPtr closure;
if(_delegable(o)->GetMetaMethod(this, MT_TOSTRING, closure)) {
Push(o);
if(CallMetaMethod(closure,MT_TOSTRING,1,res)) {;
if(CallMetaMethod(closure,MT_TOSTRING,1,res)) {
if(type(res) == OT_STRING)
return true;
}
@ -1367,9 +1369,8 @@ SQInteger SQVM::FallBackSet(const SQObjectPtr &self,const SQObjectPtr &key,const
return FALLBACK_OK;
}
else {
Pop(3);
if(type(_lasterror) != OT_NULL) { //NULL means "clean failure" (not found)
//error
Pop(3);
return FALLBACK_ERROR;
}
}
@ -1632,7 +1633,7 @@ bool SQVM::EnterFrame(SQInteger newbase, SQInteger newtop, bool tailcall)
_top = newtop;
if(newtop + MIN_STACK_OVERHEAD > (SQInteger)_stack.size()) {
if(_nmetamethodscall) {
Raise_Error(_SC("stack overflow, cannot resize stack while in a metamethod"));
Raise_Error(_SC("stack overflow, cannot resize stack while in a metamethod"));
return false;
}
_stack.resize(newtop + (MIN_STACK_OVERHEAD << 2));