forked from pool/lua54
Accepting request 821866 from home:gmbr3:Active
- Add upstream patches 7 & 8 OBS-URL: https://build.opensuse.org/request/show/821866 OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua54?expand=0&rev=7
This commit is contained in:
parent
19f828beff
commit
ee0ec2d5c6
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 20 11:00:56 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
|
||||
|
||||
- Add upstream patches 7 & 8
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 18 09:51:00 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
|
||||
|
||||
|
@ -1,5 +1,14 @@
|
||||
--- a/src/lgc.c
|
||||
+++ b/src/lgc.c
|
||||
@@ -856,6 +856,8 @@ static void GCTM (lua_State *L) {
|
||||
if (unlikely(status != LUA_OK)) { /* error while running __gc? */
|
||||
luaE_warnerror(L, "__gc metamethod");
|
||||
L->top--; /* pops error object */
|
||||
+ if (isLua(L->ci))
|
||||
+ L->oldpc = L->ci->u.l.savedpc; /* update 'oldpc' */
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1140,7 +1140,7 @@ static void finishgencycle (lua_State *L, global_State *g) {
|
||||
static void youngcollection (lua_State *L, global_State *g) {
|
||||
GCObject **psurvival; /* to point to first non-dead survival object */
|
||||
@ -91,6 +100,18 @@
|
||||
if (trap) {
|
||||
luaD_hookcall(L, ci);
|
||||
L->oldpc = pc + 1; /* next opcode will be seen as a "new" line */
|
||||
--- a/src/liolib.c
|
||||
+++ b/src/liolib.c
|
||||
@@ -279,6 +279,8 @@ static int io_popen (lua_State *L) {
|
||||
const char *filename = luaL_checkstring(L, 1);
|
||||
const char *mode = luaL_optstring(L, 2, "r");
|
||||
LStream *p = newprefile(L);
|
||||
+ luaL_argcheck(L, ((mode[0] == 'r' || mode[0] == 'w') && mode[1] == '\0'),
|
||||
+ 2, "invalid mode");
|
||||
p->f = l_popen(L, filename, mode);
|
||||
p->closef = &io_pclose;
|
||||
return (p->f == NULL) ? luaL_fileresult(L, 0, filename) : 1;
|
||||
|
||||
--- a/src/ldo.h
|
||||
+++ b/src/ldo.h
|
||||
@@ -44,7 +44,7 @@
|
||||
|
Loading…
Reference in New Issue
Block a user