aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-11-30 10:58:57 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-11-30 10:58:57 -0200
commit7bcb2462e414dbf4318edf376852fc97d6e45b33 (patch)
treef8c36e0f611c8696ece0b8ad476409ac05c30fbe /lauxlib.c
parent0bd99b327b2b485bd90116b78ddec82352fad046 (diff)
downloadlua-7bcb2462e414dbf4318edf376852fc97d6e45b33.tar.gz
lua-7bcb2462e414dbf4318edf376852fc97d6e45b33.tar.bz2
lua-7bcb2462e414dbf4318edf376852fc97d6e45b33.zip
comments
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lauxlib.c b/lauxlib.c
index fa17dfbd..e08da9bc 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.236 2011/11/14 17:10:24 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.237 2011/11/29 15:55:08 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -567,7 +567,7 @@ typedef struct LoadF {
567 567
568static const char *getF (lua_State *L, void *ud, size_t *size) { 568static const char *getF (lua_State *L, void *ud, size_t *size) {
569 LoadF *lf = (LoadF *)ud; 569 LoadF *lf = (LoadF *)ud;
570 (void)L; 570 (void)L; /* not used */
571 if (lf->n > 0) { /* are there pre-read characters to be read? */ 571 if (lf->n > 0) { /* are there pre-read characters to be read? */
572 *size = lf->n; /* return them (chars already in buffer) */ 572 *size = lf->n; /* return them (chars already in buffer) */
573 lf->n = 0; /* no more pre-read characters */ 573 lf->n = 0; /* no more pre-read characters */
@@ -668,7 +668,7 @@ typedef struct LoadS {
668 668
669static const char *getS (lua_State *L, void *ud, size_t *size) { 669static const char *getS (lua_State *L, void *ud, size_t *size) {
670 LoadS *ls = (LoadS *)ud; 670 LoadS *ls = (LoadS *)ud;
671 (void)L; 671 (void)L; /* not used */
672 if (ls->size == 0) return NULL; 672 if (ls->size == 0) return NULL;
673 *size = ls->size; 673 *size = ls->size;
674 ls->size = 0; 674 ls->size = 0;
@@ -915,8 +915,7 @@ LUALIB_API const char *luaL_gsub (lua_State *L, const char *s, const char *p,
915 915
916 916
917static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) { 917static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {
918 (void)ud; 918 (void)ud; (void)osize; /* not used */
919 (void)osize;
920 if (nsize == 0) { 919 if (nsize == 0) {
921 free(ptr); 920 free(ptr);
922 return NULL; 921 return NULL;