RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Ralf S. Engelschall
Root: /v/rpm/cvs Email: rse@rpm5.org
Module: rpm lua Date: 25-Aug-2007 10:15:11
Branch: HEAD Handle: 2007082509151000
Modified files:
lua lcode.c ldebug.c lparser.c ltable.c lvm.c
rpm CHANGES
Log:
Apply upstream vendor Lua 5.1.2 patches 1-7
Summary:
Revision Changes Path
1.4 +2 -2 lua/lcode.c
1.4 +3 -3 lua/ldebug.c
1.5 +3 -1 lua/lparser.c
1.4 +3 -3 lua/ltable.c
1.5 +4 -6 lua/lvm.c
1.1602 +1 -0 rpm/CHANGES
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: lua/lcode.c
============================================================================
$ cvs diff -u -r1.3 -r1.4 lcode.c
--- lua/lcode.c 15 Jul 2007 17:56:10 -0000 1.3
+++ lua/lcode.c 25 Aug 2007 08:15:10 -0000 1.4
@@ -1,5 +1,5 @@
/*
-** $Id: lcode.c,v 1.3 2007/07/15 17:56:10 rse Exp $
+** $Id: lcode.c,v 1.4 2007/08/25 08:15:10 rse Exp $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
@@ -699,7 +699,7 @@
e2.t = e2.f = NO_JUMP; e2.k = VKNUM; e2.u.nval = 0;
switch (op) {
case OPR_MINUS: {
- if (e->k == VK)
+ if (!isnumeral(e))
luaK_exp2anyreg(fs, e); /* cannot operate on non-numeric constants */
codearith(fs, OP_UNM, e, &e2);
break;
@@ .
patch -p0 <<'@@ .'
Index: lua/ldebug.c
============================================================================
$ cvs diff -u -r1.3 -r1.4 ldebug.c
--- lua/ldebug.c 15 Jul 2007 17:56:10 -0000 1.3
+++ lua/ldebug.c 25 Aug 2007 08:15:10 -0000 1.4
@@ -1,5 +1,5 @@
/*
-** $Id: ldebug.c,v 1.3 2007/07/15 17:56:10 rse Exp $
+** $Id: ldebug.c,v 1.4 2007/08/25 08:15:10 rse Exp $
** Debug Interface
** See Copyright Notice in lua.h
*/
@@ -563,8 +563,8 @@
void luaG_concaterror (lua_State *L, StkId p1, StkId p2) {
- if (ttisstring(p1)) p1 = p2;
- lua_assert(!ttisstring(p1));
+ if (ttisstring(p1) || ttisnumber(p1)) p1 = p2;
+ lua_assert(!ttisstring(p1) && !ttisnumber(p1));
luaG_typeerror(L, p1, "concatenate");
}
@@ .
patch -p0 <<'@@ .'
Index: lua/lparser.c
============================================================================
$ cvs diff -u -r1.4 -r1.5 lparser.c
--- lua/lparser.c 15 Jul 2007 17:56:10 -0000 1.4
+++ lua/lparser.c 25 Aug 2007 08:15:10 -0000 1.5
@@ -1,5 +1,5 @@
/*
-** $Id: lparser.c,v 1.4 2007/07/15 17:56:10 rse Exp $
+** $Id: lparser.c,v 1.5 2007/08/25 08:15:10 rse Exp $
** Lua Parser
** See Copyright Notice in lua.h
*/
@@ -938,6 +938,8 @@
primaryexp(ls, &nv.v);
if (nv.v.k == VLOCAL)
check_conflict(ls, lh, &nv.v);
+ luaY_checklimit(ls->fs, nvars, LUAI_MAXCCALLS - ls->L->nCcalls,
+ "variable names");
assignment(ls, &nv, nvars+1);
}
else { /* assignment -> `=' explist1 */
@@ .
patch -p0 <<'@@ .'
Index: lua/ltable.c
============================================================================
$ cvs diff -u -r1.3 -r1.4 ltable.c
--- lua/ltable.c 15 Jul 2007 17:56:11 -0000 1.3
+++ lua/ltable.c 25 Aug 2007 08:15:10 -0000 1.4
@@ -1,5 +1,5 @@
/*
-** $Id: ltable.c,v 1.3 2007/07/15 17:56:11 rse Exp $
+** $Id: ltable.c,v 1.4 2007/08/25 08:15:10 rse Exp $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@@ -84,8 +84,8 @@
static Node *hashnum (const Table *t, lua_Number n) {
unsigned int a[numints];
int i;
- n += 1; /* normalize number (avoid -0) */
- lua_assert(sizeof(a) <= sizeof(n));
+ if (luai_numeq(n, 0)) /* avoid problems with -0 */
+ return gnode(t, 0);
memcpy(a, &n, sizeof(a));
for (i = 1; i < numints; i++) a[0] += a[i];
return hashmod(t, a[0]);
@@ .
patch -p0 <<'@@ .'
Index: lua/lvm.c
============================================================================
$ cvs diff -u -r1.4 -r1.5 lvm.c
--- lua/lvm.c 15 Jul 2007 17:56:11 -0000 1.4
+++ lua/lvm.c 25 Aug 2007 08:15:10 -0000 1.5
@@ -1,5 +1,5 @@
/*
-** $Id: lvm.c,v 1.4 2007/07/15 17:56:11 rse Exp $
+** $Id: lvm.c,v 1.5 2007/08/25 08:15:10 rse Exp $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -61,11 +61,9 @@
lu_byte mask = L->hookmask;
const Instruction *oldpc = L->savedpc;
L->savedpc = pc;
- if (mask > LUA_MASKLINE) { /* instruction-hook set? */
- if (L->hookcount == 0) {
- resethookcount(L);
- luaD_callhook(L, LUA_HOOKCOUNT, -1);
- }
+ if ((mask & LUA_MASKCOUNT) && L->hookcount == 0) {
+ resethookcount(L);
+ luaD_callhook(L, LUA_HOOKCOUNT, -1);
}
if (mask & LUA_MASKLINE) {
Proto *p = ci_func(L->ci)->l.p;
@@ .
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1601 -r1.1602 CHANGES
--- rpm/CHANGES 25 Aug 2007 07:42:21 -0000 1.1601
+++ rpm/CHANGES 25 Aug 2007 08:15:10 -0000 1.1602
@@ -1,4 +1,5 @@
4.5 -> 5.0:
+ - rse: apply upstream vendor Lua 5.1.2 patches 1-7
- rse: add support for building against NEON >= 0.27.0
- jbj: use keyutils to get password out of rpm's address space.
- jbj: start ripping availablePackages.
@@ .
Received on Sat Aug 25 10:15:11 2007