lua

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

commit d2ab1aef311d00656bc2542c79e318e2764728fa
parent 89b56e7d84d84de58fcc9d540c2003c6c2f8c134
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Thu, 19 Jun 2014 15:29:05 -0300

detail (avoid too large macro)

Diffstat:
Mltests.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ltests.c b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.171 2014/06/10 17:41:38 roberto Exp roberto $ +** $Id: ltests.c,v 2.172 2014/06/17 17:13:29 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -207,8 +207,10 @@ static int testobjref (global_State *g, GCObject *f, GCObject *t) { return r1; } -#define checkobjref(g,f,t) \ - lua_assert((t) == NULL || testobjref(g,f,obj2gco(t))) +#define checkobjref(g,f,t) checkobjref_(g,f,obj2gco(t)) +static void checkobjref_ (global_State *g, GCObject *f, GCObject *t) { + lua_assert((t) == NULL || testobjref(g,f,obj2gco(t))); +} static void checkvalref (global_State *g, GCObject *f, const TValue *t) {