'lua_strlen' is for compatibility only

This commit is contained in:
Roberto Ierusalimschy
2006-09-18 11:03:18 -03:00
parent bd869c7b31
commit d22526ec30
5 changed files with 14 additions and 14 deletions

4
lua.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lua.c,v 1.161 2006/06/23 16:09:15 roberto Exp roberto $
** $Id: lua.c,v 1.162 2006/09/11 14:07:24 roberto Exp roberto $
** Lua stand-alone interpreter
** See Copyright Notice in lua.h
*/
@@ -199,7 +199,7 @@ static int loadline (lua_State *L) {
if (!pushline(L, 1))
return -1; /* no input */
for (;;) { /* repeat until gets a complete line */
status = luaL_loadbuffer(L, lua_tostring(L, 1), lua_strlen(L, 1), "=stdin");
status = luaL_loadbuffer(L, lua_tostring(L, 1), lua_objlen(L, 1), "=stdin");
if (!incomplete(L, status)) break; /* cannot try to add lines? */
if (!pushline(L, 0)) /* no more input? */
return -1;