From 8332d5c8a5059b85da1adaa3f0197d0f57afae81 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 27 Aug 2003 18:01:44 -0300 Subject: parser fully reentrant(!) --- lapi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index 966f72ec..33eed2eb 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 1.242 2003/08/25 19:51:54 roberto Exp roberto $ +** $Id: lapi.c,v 1.243 2003/08/25 20:00:50 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -715,12 +715,10 @@ LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *data, const char *chunkname) { ZIO z; int status; - int c; lua_lock(L); if (!chunkname) chunkname = "?"; luaZ_init(L, &z, reader, data); - c = luaZ_lookahead(&z); - status = luaD_protectedparser(L, &z, (c == LUA_SIGNATURE[0]), chunkname); + status = luaD_protectedparser(L, &z, chunkname); lua_unlock(L); return status; } -- cgit v1.2.3-55-g6feb