summaryrefslogtreecommitdiff
path: root/src/3rdparty/squirrel/squirrel/sqvm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/squirrel/squirrel/sqvm.cpp')
-rw-r--r--src/3rdparty/squirrel/squirrel/sqvm.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/3rdparty/squirrel/squirrel/sqvm.cpp b/src/3rdparty/squirrel/squirrel/sqvm.cpp
index 1987a3009..b6f2c526d 100644
--- a/src/3rdparty/squirrel/squirrel/sqvm.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqvm.cpp
@@ -33,7 +33,7 @@ void SQVM::ClearStack(SQInteger last_top)
tOldType = o._type;
unOldVal = o._unVal;
o._type = OT_NULL;
- o._unVal.pUserPointer = NULL;
+ o._unVal.pUserPointer = nullptr;
__Release(tOldType,unOldVal);
}
}
@@ -107,7 +107,7 @@ SQVM::SQVM(SQSharedState *ss)
_suspended_target=-1;
_suspended_root = SQFalse;
_suspended_traps=0;
- _foreignptr=NULL;
+ _foreignptr=nullptr;
_nnativecalls=0;
_lasterror = _null_;
_errorhandler = _null_;
@@ -115,12 +115,12 @@ SQVM::SQVM(SQSharedState *ss)
_can_suspend = false;
_in_stackoverflow = false;
_ops_till_suspend = 0;
- _callsstack = NULL;
+ _callsstack = nullptr;
_callsstacksize = 0;
_alloccallsstacksize = 0;
_top = 0;
_stackbase = 0;
- ci = NULL;
+ ci = nullptr;
INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this);
}
@@ -379,7 +379,7 @@ bool SQVM::StartCall(SQClosure *closure,SQInteger target,SQInteger args,SQIntege
if (!tailcall) {
CallInfo lc = {};
- lc._generator = NULL;
+ lc._generator = nullptr;
lc._etraps = 0;
lc._prevstkbase = (SQInt32) ( stackbase - _stackbase );
lc._target = (SQInt32) target;
@@ -557,7 +557,7 @@ bool SQVM::DELEGATE_OP(SQObjectPtr &trg,SQObjectPtr &o1,SQObjectPtr &o2)
}
break;
case OT_NULL:
- _table(o1)->SetDelegate(NULL);
+ _table(o1)->SetDelegate(nullptr);
break;
default:
Raise_Error("using '%s' as delegate", GetTypeName(o2));
@@ -627,7 +627,7 @@ bool SQVM::GETVARGV_OP(SQObjectPtr &target,SQObjectPtr &index,CallInfo *ci)
bool SQVM::CLASS_OP(SQObjectPtr &target,SQInteger baseclass,SQInteger attributes)
{
- SQClass *base = NULL;
+ SQClass *base = nullptr;
SQObjectPtr attrs;
if(baseclass != -1) {
if(type(_stack._vals[_stackbase+baseclass]) != OT_CLASS) { Raise_Error("trying to inherit from a %s",GetTypeName(_stack._vals[_stackbase+baseclass])); return false; }
@@ -708,7 +708,7 @@ bool SQVM::Execute(SQObjectPtr &closure, SQInteger target, SQInteger nargs, SQIn
temp_reg = closure;
if(!StartCall(_closure(temp_reg), _top - nargs, nargs, stackbase, false)) {
//call the handler if there are no calls in the stack, if not relies on the previous node
- if(ci == NULL) CallErrorHandler(_lasterror);
+ if(ci == nullptr) CallErrorHandler(_lasterror);
return false;
}
if (_funcproto(_closure(temp_reg)->_function)->_bgenerator) {
@@ -1160,7 +1160,7 @@ bool SQVM::CallNative(SQNativeClosure *nclosure,SQInteger nargs,SQInteger stackb
_top = stackbase + nargs;
CallInfo lci = {};
lci._closure = nclosure;
- lci._generator = NULL;
+ lci._generator = nullptr;
lci._etraps = 0;
lci._prevstkbase = (SQInt32) (stackbase - _stackbase);
lci._ncalls = 1;