patch2.patch 1.3 KB

1234567891011121314151617181920212223
  1. diff --git a/external/squirrel/squirrel/sqclosure.h b/external/squirrel/squirrel/sqclosure.h
  2. index 07b3efc..dc108de 100644
  3. --- a/external/squirrel/squirrel/sqclosure.h
  4. +++ b/external/squirrel/squirrel/sqclosure.h
  5. @@ -10,7 +10,7 @@ struct SQClass;
  6. struct SQClosure : public CHAINABLE_OBJ
  7. {
  8. private:
  9. - SQClosure(SQSharedState *ss,SQFunctionProto *func){_function = func; __ObjAddRef(_function); _base = NULL; INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}
  10. + 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;}
  11. public:
  12. static SQClosure *Create(SQSharedState *ss,SQFunctionProto *func){
  13. SQInteger size = _CALC_CLOSURE_SIZE(func);
  14. @@ -139,7 +139,7 @@ public:
  15. struct SQNativeClosure : public CHAINABLE_OBJ
  16. {
  17. private:
  18. - SQNativeClosure(SQSharedState *ss,SQFUNCTION func){_function=func;INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;}
  19. + 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;}
  20. public:
  21. static SQNativeClosure *Create(SQSharedState *ss,SQFUNCTION func,SQInteger nouters)
  22. {