diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-02-17 15:34:16 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-02-17 15:34:16 -0200 |
commit | 3c710f056b683136a342bc5bf88d852717cd0d33 (patch) | |
tree | 39faa6d42d6b512d482d6afe0bc01de14ff0315d /lzio.h | |
parent | c0a865fa54b3c692af3783bd9470b8c0537b77b4 (diff) | |
download | lua-3c710f056b683136a342bc5bf88d852717cd0d33.tar.gz lua-3c710f056b683136a342bc5bf88d852717cd0d33.tar.bz2 lua-3c710f056b683136a342bc5bf88d852717cd0d33.zip |
small bug: may call reader function again after it returned end
of input
Diffstat (limited to 'lzio.h')
-rw-r--r-- | lzio.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lzio.h,v 1.21 2005/05/17 19:49:15 roberto Exp roberto $ | 2 | ** $Id: lzio.h,v 1.22 2009/05/18 17:26:25 roberto Exp roberto $ |
3 | ** Buffered streams | 3 | ** Buffered streams |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -59,9 +59,10 @@ LUAI_FUNC int luaZ_lookahead (ZIO *z); | |||
59 | struct Zio { | 59 | struct Zio { |
60 | size_t n; /* bytes still unread */ | 60 | size_t n; /* bytes still unread */ |
61 | const char *p; /* current position in buffer */ | 61 | const char *p; /* current position in buffer */ |
62 | lua_Reader reader; | 62 | lua_Reader reader; /* reader function */ |
63 | void* data; /* additional data */ | 63 | void* data; /* additional data */ |
64 | lua_State *L; /* Lua state (for reader) */ | 64 | lua_State *L; /* Lua state (for reader) */ |
65 | int eoz; /* true if reader has no more data */ | ||
65 | }; | 66 | }; |
66 | 67 | ||
67 | 68 | ||