summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-09-16 21:11:14 +0000
committerrubidium <rubidium@openttd.org>2014-09-16 21:11:14 +0000
commit168511816989ed8ea6de4721601f008d719298e9 (patch)
tree886e9498258acf18d6537b3ca64fc6283e0db937 /src
parent22fc96ad6bc8d69707b2d3a20f47562da818da01 (diff)
downloadopenttd-168511816989ed8ea6de4721601f008d719298e9.tar.xz
(svn r26840) -Fix [Squirrel]: merge Init and constructor of SQSharedState
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/squirrel/squirrel/sqapi.cpp1
-rw-r--r--src/3rdparty/squirrel/squirrel/sqstate.cpp14
-rw-r--r--src/3rdparty/squirrel/squirrel/sqstate.h1
3 files changed, 5 insertions, 11 deletions
diff --git a/src/3rdparty/squirrel/squirrel/sqapi.cpp b/src/3rdparty/squirrel/squirrel/sqapi.cpp
index 117e06b93..04718385b 100644
--- a/src/3rdparty/squirrel/squirrel/sqapi.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqapi.cpp
@@ -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;
diff --git a/src/3rdparty/squirrel/squirrel/sqstate.cpp b/src/3rdparty/squirrel/squirrel/sqstate.cpp
index a0bc518c3..73ee649d5 100644
--- a/src/3rdparty/squirrel/squirrel/sqstate.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqstate.cpp
@@ -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
diff --git a/src/3rdparty/squirrel/squirrel/sqstate.h b/src/3rdparty/squirrel/squirrel/sqstate.h
index 8b9c9fbe6..da6bf9ae6 100644
--- a/src/3rdparty/squirrel/squirrel/sqstate.h
+++ b/src/3rdparty/squirrel/squirrel/sqstate.h
@@ -58,7 +58,6 @@ struct SQSharedState
{
SQSharedState();
~SQSharedState();
- void Init();
public:
SQChar* GetScratchPad(SQInteger size);
SQInteger GetMetaMethodIdxByName(const SQObjectPtr &name);