From 619be354c8e38b53d36930dc6f7f1242cd2d853f Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 17 Apr 2007 10:19:53 -0300 Subject: lua_pushstring/pushlstring return string --- ltests.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index cbafa686..08141411 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.40 2006/10/10 17:40:17 roberto Exp roberto $ +** $Id: ltests.c,v 2.41 2007/04/10 12:17:52 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -892,7 +892,8 @@ static int testC (lua_State *L) { } else if EQ("tostring") { const char *s = lua_tostring(L1, getindex); - lua_pushstring(L1, s); + const char *s1 = lua_pushstring(L1, s); + lua_assert((s == NULL && s1 == NULL) || (strcmp)(s, s1) == 0); } else if EQ("objsize") { lua_pushinteger(L1, lua_objlen(L1, getindex)); -- cgit v1.2.3-55-g6feb