lua

A copy of the Lua development repository
Log | Files | Refs | README

commit ee1edd5734ba27b9927198a61de5f3f26094263a
parent 8efb44b5e046fd1ba671f489b3b996ff97386165
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Tue,  5 Jul 2005 11:30:58 -0300

detail

Diffstat:
Mlapi.c | 4++--
Mlvm.c | 7+++----
2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/lapi.c b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.42 2005/05/31 14:25:18 roberto Exp roberto $ +** $Id: lapi.c,v 2.43 2005/05/31 14:34:02 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -985,7 +985,7 @@ LUA_API void lua_concat (lua_State *L, int n) { LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud) { - *ud = G(L)->ud; + if (ud) *ud = G(L)->ud; return G(L)->frealloc; } diff --git a/lvm.c b/lvm.c @@ -1,5 +1,5 @@ /* -** $Id: lvm.c,v 2.46 2005/05/31 14:25:18 roberto Exp roberto $ +** $Id: lvm.c,v 2.47 2005/06/13 14:15:22 roberto Exp roberto $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -311,8 +311,8 @@ void luaV_concat (lua_State *L, int total, int last) { } -static StkId Arith (lua_State *L, StkId ra, const TValue *rb, - const TValue *rc, TMS op) { +static void Arith (lua_State *L, StkId ra, const TValue *rb, + const TValue *rc, TMS op) { TValue tempb, tempc; const TValue *b, *c; if ((b = luaV_tonumber(rb, &tempb)) != NULL && @@ -330,7 +330,6 @@ static StkId Arith (lua_State *L, StkId ra, const TValue *rb, } else if (!call_binTM(L, rb, rc, ra, op)) luaG_aritherror(L, rb, rc); - return L->base; }