From d7ba390af6ba4cdbcf4906f71d1710279d55a362 Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Sun, 22 Mar 2015 03:14:16 +0100 Subject: [PATCH] Remove last patch since it has undone some of the previous squirrel fixes --- external/squirrel/patches/patch5.patch | 76 ---------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 external/squirrel/patches/patch5.patch diff --git a/external/squirrel/patches/patch5.patch b/external/squirrel/patches/patch5.patch deleted file mode 100644 index ea7e207c6..000000000 --- a/external/squirrel/patches/patch5.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/external/squirrel/sqstdlib/sqstdstream.cpp b/external/squirrel/sqstdlib/sqstdstream.cpp -index 1b7a08f..af866a8 100644 ---- a/external/squirrel/sqstdlib/sqstdstream.cpp -+++ b/external/squirrel/sqstdlib/sqstdstream.cpp -@@ -258,7 +258,11 @@ void init_streamclass(HSQUIRRELVM v) - sq_pushstring(v,_SC("std_stream"),-1); - if(SQ_FAILED(sq_get(v,-2))) { - sq_pushstring(v,_SC("std_stream"),-1); -- sq_newclass(v,SQFalse); -+ if(SQ_FAILED(sq_newclass(v,SQFalse))) -+ { -+ throw "Failed to create new std_stream class"; -+ return; -+ } - sq_settypetag(v,-1,(SQUserPointer)SQSTD_STREAM_TYPE_TAG); - SQInteger i = 0; - while(_stream_methods[i].name != 0) { -@@ -266,10 +270,16 @@ void init_streamclass(HSQUIRRELVM v) - sq_pushstring(v,f.name,-1); - sq_newclosure(v,f.f,0); - sq_setparamscheck(v,f.nparamscheck,f.typemask); -- sq_newslot(v,-3,SQFalse); -+ if(SQ_FAILED(sq_newslot(v,-3,SQFalse))) -+ { -+ throw "Failed to create new table slot for stream_method"; -+ } - i++; - } -- sq_newslot(v,-3,SQFalse); -+ if(SQ_FAILED(sq_newslot(v,-3,SQFalse))) -+ { -+ throw "Failed to create new table slot for stream"; -+ } - sq_pushroottable(v); - sq_pushstring(v,_SC("stream"),-1); - sq_pushstring(v,_SC("std_stream"),-1); -@@ -306,7 +316,10 @@ SQRESULT declare_stream(HSQUIRRELVM v,const SQChar* name,SQUserPointer typetag,c - sq_newslot(v,-3,SQFalse); - i++; - } -- sq_newslot(v,-3,SQFalse); -+ if(SQ_FAILED(sq_newslot(v,-3,SQFalse))) -+ { -+ throw "Failed to create new table slot"; -+ } - sq_pop(v,1); - - i = 0; -@@ -317,7 +330,10 @@ SQRESULT declare_stream(HSQUIRRELVM v,const SQChar* name,SQUserPointer typetag,c - sq_newclosure(v,f.f,0); - sq_setparamscheck(v,f.nparamscheck,f.typemask); - sq_setnativeclosurename(v,-1,f.name); -- sq_newslot(v,-3,SQFalse); -+ if(SQ_FAILED(sq_newslot(v,-3,SQFalse))) -+ { -+ throw "Failed to create new table slot for global"; -+ } - i++; - } - //register the class in the target table -diff --git a/external/squirrel/sqstdlib/sqstdsystem.cpp b/external/squirrel/sqstdlib/sqstdsystem.cpp -index 40f78d7..b5359b6 100644 ---- a/external/squirrel/sqstdlib/sqstdsystem.cpp -+++ b/external/squirrel/sqstdlib/sqstdsystem.cpp -@@ -140,7 +140,10 @@ SQInteger sqstd_register_systemlib(HSQUIRRELVM v) - sq_newclosure(v,systemlib_funcs[i].f,0); - sq_setparamscheck(v,systemlib_funcs[i].nparamscheck,systemlib_funcs[i].typemask); - sq_setnativeclosurename(v,-1,systemlib_funcs[i].name); -- sq_newslot(v,-3,SQFalse); -+ if(SQ_FAILED(sq_newslot(v,-3,SQFalse))) -+ { -+ throw "Failed to create new table slot for systemlib_func"; -+ } - i++; - } - return 1; -- 2.11.0