summaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-06 14:26:45 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-06 14:26:45 -0300
commitd3dd337fcaf286c83103e283b72b6ef52d837ba3 (patch)
tree860947c3a7e1a4b34969700bda4dcf0ac05416d1 /lauxlib.c
parent634344d61fb4bd7ebd033d37b814a0083e55b5a2 (diff)
downloadlua-github-d3dd337fcaf286c83103e283b72b6ef52d837ba3.tar.gz
lua_Chunkreader gets a lua_State, to avoid future incompatibilities
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lauxlib.c b/lauxlib.c
index f4e21d60..068e01f5 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lauxlib.c,v 1.79 2002/08/05 17:36:24 roberto Exp roberto $
+** $Id: lauxlib.c,v 1.80 2002/08/06 15:32:22 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -315,8 +315,9 @@ typedef struct LoadF {
} LoadF;
-static const char *getF (void *ud, size_t *size) {
+static const char *getF (lua_State *L, void *ud, size_t *size) {
LoadF *lf = (LoadF *)ud;
+ (void)L;
if (feof(lf->f)) return NULL;
*size = fread(lf->buff, 1, LUAL_BUFFERSIZE, lf->f);
return (*size > 0) ? lf->buff : NULL;
@@ -365,8 +366,9 @@ typedef struct LoadS {
} LoadS;
-static const char *getS (void *ud, size_t *size) {
+static const char *getS (lua_State *L, void *ud, size_t *size) {
LoadS *ls = (LoadS *)ud;
+ (void)L;
if (ls->size == 0) return NULL;
*size = ls->size;
ls->size = 0;