(svn r26840) -Fix [Squirrel]: merge Init and constructor of SQSharedState

This commit is contained in:
rubidium 2014-09-16 21:11:14 +00:00
parent 22fc96ad6b
commit 1685118169
3 changed files with 5 additions and 11 deletions

View File

@ -57,7 +57,6 @@ HSQUIRRELVM sq_open(SQInteger initialstacksize)
SQSharedState *ss;
SQVM *v;
sq_new(ss, SQSharedState);
ss->Init();
v = (SQVM *)SQ_MALLOC(sizeof(SQVM));
new (v) SQVM(ss);
ss->_root_vm = v;

View File

@ -23,14 +23,6 @@ SQObjectPtr _false_(false);
SQObjectPtr _one_((SQInteger)1);
SQObjectPtr _minusone_((SQInteger)-1);
SQSharedState::SQSharedState()
{
_compilererrorhandler = NULL;
_printfunc = NULL;
_debuginfo = false;
_notifyallexceptions = false;
}
#define newsysstring(s) { \
_systemstrings->push_back(SQString::Create(this,s)); \
}
@ -99,8 +91,12 @@ SQTable *CreateDefaultDelegate(SQSharedState *ss,SQRegFunction *funcz)
return t;
}
void SQSharedState::Init()
SQSharedState::SQSharedState()
{
_compilererrorhandler = NULL;
_printfunc = NULL;
_debuginfo = false;
_notifyallexceptions = false;
_scratchpad=NULL;
_scratchpadsize=0;
#ifndef NO_GARBAGE_COLLECTOR

View File

@ -58,7 +58,6 @@ struct SQSharedState
{
SQSharedState();
~SQSharedState();
void Init();
public:
SQChar* GetScratchPad(SQInteger size);
SQInteger GetMetaMethodIdxByName(const SQObjectPtr &name);