Another round of fixes for squirrel
authorTobias Markus <tobbi@mozilla-uk.org>
Sat, 7 Mar 2015 13:27:21 +0000 (14:27 +0100)
committerTobias Markus <tobbi@mozilla-uk.org>
Sat, 7 Mar 2015 13:27:21 +0000 (14:27 +0100)
external/squirrel/patches/patch2.patch [new file with mode: 0644]

diff --git a/external/squirrel/patches/patch2.patch b/external/squirrel/patches/patch2.patch
new file mode 100644 (file)
index 0000000..cadb341
--- /dev/null
@@ -0,0 +1,22 @@
+diff --git a/external/squirrel/squirrel/sqclosure.h b/external/squirrel/squirrel/sqclosure.h
+index 07b3efc..dc108de 100644
+--- a/external/squirrel/squirrel/sqclosure.h
++++ b/external/squirrel/squirrel/sqclosure.h
+@@ -10,7 +10,7 @@ struct SQClass;
+ struct SQClosure : public CHAINABLE_OBJ
+ {
+ private:
+-      SQClosure(SQSharedState *ss,SQFunctionProto *func){_function = func; __ObjAddRef(_function); _base = NULL; INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}
++    SQClosure(SQSharedState *ss,SQFunctionProto *func): _outervalues(NULL), _defaultparams(NULL) {_function = func; __ObjAddRef(_function); _base = NULL; INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}
+ public:
+       static SQClosure *Create(SQSharedState *ss,SQFunctionProto *func){
+               SQInteger size = _CALC_CLOSURE_SIZE(func);
+@@ -139,7 +139,7 @@ public:
+ struct SQNativeClosure : public CHAINABLE_OBJ
+ {
+ private:
+-      SQNativeClosure(SQSharedState *ss,SQFUNCTION func){_function=func;INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}
++      SQNativeClosure(SQSharedState *ss,SQFUNCTION func): _nparamscheck(0), _outervalues(NULL), _noutervalues(0){_function=func;INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}
+ public:
+       static SQNativeClosure *Create(SQSharedState *ss,SQFUNCTION func,SQInteger nouters)
+       {