Skip to content

Commit

Permalink
Fix for syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed Mar 22, 2015
1 parent 278d669 commit a240004
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions external/squirrel/patches/patch5.patch
Expand Up @@ -20,14 +20,14 @@ index 1b7a08f..af866a8 100644
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))
+ 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))
+ if(SQ_FAILED(sq_newslot(v,-3,SQFalse)))
+ {
+ throw "Failed to create new table slot for stream";
+ }
Expand All @@ -39,9 +39,9 @@ index 1b7a08f..af866a8 100644
i++;
}
- sq_newslot(v,-3,SQFalse);
+ if(SQ_FAILED(sq_newslot(v,-3,SQFalse))
+ if(SQ_FAILED(sq_newslot(v,-3,SQFalse)))
+ {
+ throw "Failed to create new table slot"
+ throw "Failed to create new table slot";
+ }
sq_pop(v,1);

Expand All @@ -51,7 +51,7 @@ index 1b7a08f..af866a8 100644
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))
+ if(SQ_FAILED(sq_newslot(v,-3,SQFalse)))
+ {
+ throw "Failed to create new table slot for global";
+ }
Expand All @@ -67,9 +67,9 @@ index 40f78d7..b5359b6 100644
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))
+ if(SQ_FAILED(sq_newslot(v,-3,SQFalse)))
+ {
+ // Could not create table slot
+ throw "Failed to create new table slot for systemlib_func";
+ }
i++;
}
Expand Down

0 comments on commit a240004

Please sign in to comment.