Module Name:    src
Committed By:   mbalmer
Date:           Fri Mar 25 08:15:20 UTC 2016

Modified Files:
        src/external/mit/lua/dist/src: lparser.c lstrlib.c

Log Message:
Apply second and third patch from http://lua.org/bugs.html.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/mit/lua/dist/src/lparser.c
cvs rdiff -u -r1.11 -r1.12 src/external/mit/lua/dist/src/lstrlib.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/lua/dist/src/lparser.c
diff -u src/external/mit/lua/dist/src/lparser.c:1.4 src/external/mit/lua/dist/src/lparser.c:1.5
--- src/external/mit/lua/dist/src/lparser.c:1.4	Thu Jan 28 14:41:39 2016
+++ src/external/mit/lua/dist/src/lparser.c	Fri Mar 25 08:15:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: lparser.c,v 1.4 2016/01/28 14:41:39 lneto Exp $	*/
+/*	$NetBSD: lparser.c,v 1.5 2016/03/25 08:15:20 mbalmer Exp $	*/
 
 /*
 ** Id: lparser.c,v 2.149 2015/11/02 16:09:30 roberto Exp 
@@ -1240,7 +1240,7 @@ static void labelstat (LexState *ls, TSt
   checkrepeated(fs, ll, label);  /* check for repeated labels */
   checknext(ls, TK_DBCOLON);  /* skip double colon */
   /* create new entry for this label */
-  l = newlabelentry(ls, ll, label, line, fs->pc);
+  l = newlabelentry(ls, ll, label, line, luaK_getlabel(fs));
   skipnoopstat(ls);  /* skip other no-op statements */
   if (block_follow(ls, 0)) {  /* label is last no-op statement in the block? */
     /* assume that locals are already out of scope */

Index: src/external/mit/lua/dist/src/lstrlib.c
diff -u src/external/mit/lua/dist/src/lstrlib.c:1.11 src/external/mit/lua/dist/src/lstrlib.c:1.12
--- src/external/mit/lua/dist/src/lstrlib.c:1.11	Thu Jan 28 14:41:39 2016
+++ src/external/mit/lua/dist/src/lstrlib.c	Fri Mar 25 08:15:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: lstrlib.c,v 1.11 2016/01/28 14:41:39 lneto Exp $	*/
+/*	$NetBSD: lstrlib.c,v 1.12 2016/03/25 08:15:20 mbalmer Exp $	*/
 
 /*
 ** Id: lstrlib.c,v 1.239 2015/11/25 16:28:17 roberto Exp 
@@ -692,6 +692,7 @@ typedef struct GMatchState {
 static int gmatch_aux (lua_State *L) {
   GMatchState *gm = (GMatchState *)lua_touserdata(L, lua_upvalueindex(3));
   const char *src;
+  gm->ms.L = L;
   for (src = gm->src; src <= gm->ms.src_end; src++) {
     const char *e;
     reprepstate(&gm->ms);

Reply via email to