mirror of https://github.com/lua/lua
comments
This commit is contained in:
parent
0bd99b327b
commit
7bcb2462e4
8
lapi.c
8
lapi.c
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lapi.c,v 2.157 2011/11/16 18:51:36 roberto Exp roberto $
|
||||
** $Id: lapi.c,v 2.158 2011/11/29 15:55:08 roberto Exp roberto $
|
||||
** Lua API
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -1209,7 +1209,7 @@ static const char *aux_upvalue (StkId fi, int n, TValue **val,
|
|||
|
||||
LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) {
|
||||
const char *name;
|
||||
TValue *val = NULL; /* initialized to avoid warnings */
|
||||
TValue *val = NULL; /* to avoid warnings */
|
||||
lua_lock(L);
|
||||
name = aux_upvalue(index2addr(L, funcindex), n, &val, NULL);
|
||||
if (name) {
|
||||
|
@ -1223,8 +1223,8 @@ LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) {
|
|||
|
||||
LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) {
|
||||
const char *name;
|
||||
TValue *val = NULL; /* initialized to avoid warnings */
|
||||
GCObject *owner = NULL; /* initialized to avoid warnings */
|
||||
TValue *val = NULL; /* to avoid warnings */
|
||||
GCObject *owner = NULL; /* to avoid warnings */
|
||||
StkId fi;
|
||||
lua_lock(L);
|
||||
fi = index2addr(L, funcindex);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lauxlib.c,v 1.236 2011/11/14 17:10:24 roberto Exp roberto $
|
||||
** $Id: lauxlib.c,v 1.237 2011/11/29 15:55:08 roberto Exp roberto $
|
||||
** Auxiliary functions for building Lua libraries
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -567,7 +567,7 @@ typedef struct LoadF {
|
|||
|
||||
static const char *getF (lua_State *L, void *ud, size_t *size) {
|
||||
LoadF *lf = (LoadF *)ud;
|
||||
(void)L;
|
||||
(void)L; /* not used */
|
||||
if (lf->n > 0) { /* are there pre-read characters to be read? */
|
||||
*size = lf->n; /* return them (chars already in buffer) */
|
||||
lf->n = 0; /* no more pre-read characters */
|
||||
|
@ -668,7 +668,7 @@ typedef struct LoadS {
|
|||
|
||||
static const char *getS (lua_State *L, void *ud, size_t *size) {
|
||||
LoadS *ls = (LoadS *)ud;
|
||||
(void)L;
|
||||
(void)L; /* not used */
|
||||
if (ls->size == 0) return NULL;
|
||||
*size = ls->size;
|
||||
ls->size = 0;
|
||||
|
@ -915,8 +915,7 @@ LUALIB_API const char *luaL_gsub (lua_State *L, const char *s, const char *p,
|
|||
|
||||
|
||||
static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {
|
||||
(void)ud;
|
||||
(void)osize;
|
||||
(void)ud; (void)osize; /* not used */
|
||||
if (nsize == 0) {
|
||||
free(ptr);
|
||||
return NULL;
|
||||
|
|
10
loadlib.c
10
loadlib.c
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: loadlib.c,v 1.105 2011/11/25 12:52:03 roberto Exp roberto $
|
||||
** $Id: loadlib.c,v 1.106 2011/11/28 17:27:51 roberto Exp roberto $
|
||||
** Dynamic library loader for Lua
|
||||
** See Copyright Notice in lua.h
|
||||
**
|
||||
|
@ -197,7 +197,7 @@ static void ll_unloadlib (void *lib) {
|
|||
|
||||
static void *ll_load (lua_State *L, const char *path, int seeglb) {
|
||||
HMODULE lib = LoadLibraryExA(path, NULL, LUA_LLE_FLAGS);
|
||||
(void)(seeglb); /* symbols are 'global' by default */
|
||||
(void)(seeglb); /* not used: symbols are 'global' by default */
|
||||
if (lib == NULL) pusherror(L);
|
||||
return lib;
|
||||
}
|
||||
|
@ -227,19 +227,19 @@ static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) {
|
|||
|
||||
|
||||
static void ll_unloadlib (void *lib) {
|
||||
(void)(lib); /* to avoid warnings */
|
||||
(void)(lib); /* not used */
|
||||
}
|
||||
|
||||
|
||||
static void *ll_load (lua_State *L, const char *path, int seeglb) {
|
||||
(void)(path); (void)(seeglb); /* to avoid warnings */
|
||||
(void)(path); (void)(seeglb); /* not used */
|
||||
lua_pushliteral(L, DLMSG);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) {
|
||||
(void)(lib); (void)(sym); /* to avoid warnings */
|
||||
(void)(lib); (void)(sym); /* not used */
|
||||
lua_pushliteral(L, DLMSG);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue