1
0
Fork 0
forked from len0rd/rockbox

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.
This commit is contained in:
Marcin Bukat 2014-04-02 20:46:06 +02:00
parent 36378988ad
commit bfd0179042
64 changed files with 5733 additions and 9088 deletions

View file

@ -1,5 +1,5 @@
/*
** $Id: lzio.h,v 1.26.1.1 2013/04/12 18:48:47 roberto Exp $
** $Id$
** Buffered streams
** See Copyright Notice in lua.h
*/
@ -17,8 +17,9 @@
typedef struct Zio ZIO;
#define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_fill(z))
#define char2int(c) cast(int, cast(unsigned char, (c)))
#define zgetc(z) (((z)->n--)>0 ? char2int(*(z)->p++) : luaZ_fill(z))
typedef struct Mbuffer {
char *buffer;
@ -46,6 +47,7 @@ LUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n);
LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader,
void *data);
LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */
LUAI_FUNC int luaZ_lookahead (ZIO *z);
@ -54,7 +56,7 @@ LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */
struct Zio {
size_t n; /* bytes still unread */
const char *p; /* current position in buffer */
lua_Reader reader; /* reader function */
lua_Reader reader;
void* data; /* additional data */
lua_State *L; /* Lua state (for reader) */
};