From ee1edd5734ba27b9927198a61de5f3f26094263a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 5 Jul 2005 11:31:20 -0300 Subject: [PATCH] detail --- lapi.c | 4 ++-- lvm.c | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lapi.c b/lapi.c index 60fcf0c6..17873e9b 100644 --- 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 index 1c5beb77..adc9019a 100644 --- 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; }