diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2014-04-02 20:46:06 +0200 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2014-04-02 20:46:06 +0200 |
commit | bfd0179042b0b02fb88748d54e56e7e208bb117f (patch) | |
tree | 42d5fd51574054caaf673420fca1ec962d62d2f2 /apps/plugins/lua/lzio.h | |
parent | 36378988ad4059982742f05f5eb50580b456840a (diff) | |
download | rockbox-bfd0179042b0b02fb88748d54e56e7e208bb117f.tar.gz rockbox-bfd0179042b0b02fb88748d54e56e7e208bb117f.zip |
Revert "Update lua plugin to 5.2.3"
FILE typedef to *void needs more work to not break sim and
application builds. I checked only a few random native builds
unfortunately. Sorry for inconvenience.
Diffstat (limited to 'apps/plugins/lua/lzio.h')
-rw-r--r-- | apps/plugins/lua/lzio.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/plugins/lua/lzio.h b/apps/plugins/lua/lzio.h index 441f7479cb..9aa9e4b537 100644 --- a/apps/plugins/lua/lzio.h +++ b/apps/plugins/lua/lzio.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lzio.h,v 1.26.1.1 2013/04/12 18:48:47 roberto Exp $ | 2 | ** $Id$ |
3 | ** Buffered streams | 3 | ** Buffered streams |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -17,8 +17,9 @@ | |||
17 | 17 | ||
18 | typedef struct Zio ZIO; | 18 | typedef struct Zio ZIO; |
19 | 19 | ||
20 | #define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_fill(z)) | 20 | #define char2int(c) cast(int, cast(unsigned char, (c))) |
21 | 21 | ||
22 | #define zgetc(z) (((z)->n--)>0 ? char2int(*(z)->p++) : luaZ_fill(z)) | ||
22 | 23 | ||
23 | typedef struct Mbuffer { | 24 | typedef struct Mbuffer { |
24 | char *buffer; | 25 | char *buffer; |
@@ -46,6 +47,7 @@ LUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n); | |||
46 | LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, | 47 | LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, |
47 | void *data); | 48 | void *data); |
48 | LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */ | 49 | LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */ |
50 | LUAI_FUNC int luaZ_lookahead (ZIO *z); | ||
49 | 51 | ||
50 | 52 | ||
51 | 53 | ||
@@ -54,7 +56,7 @@ LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */ | |||
54 | struct Zio { | 56 | struct Zio { |
55 | size_t n; /* bytes still unread */ | 57 | size_t n; /* bytes still unread */ |
56 | const char *p; /* current position in buffer */ | 58 | const char *p; /* current position in buffer */ |
57 | lua_Reader reader; /* reader function */ | 59 | lua_Reader reader; |
58 | void* data; /* additional data */ | 60 | void* data; /* additional data */ |
59 | lua_State *L; /* Lua state (for reader) */ | 61 | lua_State *L; /* Lua state (for reader) */ |
60 | }; | 62 | }; |