summaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2007-04-17 10:19:53 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2007-04-17 10:19:53 -0300
commit619be354c8e38b53d36930dc6f7f1242cd2d853f (patch)
treed3d82ba3deecf1ec6d52e384879f1233b445ab09 /ltests.c
parent94d40f3980d4f13ed33d1c23fcc8c7aafbd7be59 (diff)
downloadlua-619be354c8e38b53d36930dc6f7f1242cd2d853f.tar.gz
lua-619be354c8e38b53d36930dc6f7f1242cd2d853f.tar.bz2
lua-619be354c8e38b53d36930dc6f7f1242cd2d853f.zip
lua_pushstring/pushlstring return string
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ltests.c b/ltests.c
index cbafa686..08141411 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.40 2006/10/10 17:40:17 roberto Exp roberto $ 2** $Id: ltests.c,v 2.41 2007/04/10 12:17:52 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -892,7 +892,8 @@ static int testC (lua_State *L) {
892 } 892 }
893 else if EQ("tostring") { 893 else if EQ("tostring") {
894 const char *s = lua_tostring(L1, getindex); 894 const char *s = lua_tostring(L1, getindex);
895 lua_pushstring(L1, s); 895 const char *s1 = lua_pushstring(L1, s);
896 lua_assert((s == NULL && s1 == NULL) || (strcmp)(s, s1) == 0);
896 } 897 }
897 else if EQ("objsize") { 898 else if EQ("objsize") {
898 lua_pushinteger(L1, lua_objlen(L1, getindex)); 899 lua_pushinteger(L1, lua_objlen(L1, getindex));