aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lobject.c6
-rw-r--r--ltablib.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/lobject.c b/lobject.c
index 4fe5fdb4..fd522394 100644
--- a/lobject.c
+++ b/lobject.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.c,v 2.14 2005/05/20 15:53:42 roberto Exp roberto $ 2** $Id: lobject.c,v 2.15 2005/05/31 14:25:18 roberto Exp roberto $
3** Some generic functions over Lua objects 3** Some generic functions over Lua objects
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -116,7 +116,9 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) {
116 incr_top(L); 116 incr_top(L);
117 switch (*(e+1)) { 117 switch (*(e+1)) {
118 case 's': { 118 case 's': {
119 pushstr(L, va_arg(argp, char *)); 119 const char *s = va_arg(argp, char *);
120 if (s == NULL) s = "(null)";
121 pushstr(L, s);
120 break; 122 break;
121 } 123 }
122 case 'c': { 124 case 'c': {
diff --git a/ltablib.c b/ltablib.c
index 804999e2..578c1264 100644
--- a/ltablib.c
+++ b/ltablib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltablib.c,v 1.30 2005/05/16 21:19:00 roberto Exp roberto $ 2** $Id: ltablib.c,v 1.31 2005/05/17 19:49:15 roberto Exp roberto $
3** Library for Table Manipulation 3** Library for Table Manipulation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -109,7 +109,7 @@ static int tremove (lua_State *L) {
109} 109}
110 110
111 111
112static int str_concat (lua_State *L) { 112static int tconcat (lua_State *L) {
113 luaL_Buffer b; 113 luaL_Buffer b;
114 size_t lsep; 114 size_t lsep;
115 const char *sep = luaL_optlstring(L, 2, "", &lsep); 115 const char *sep = luaL_optlstring(L, 2, "", &lsep);
@@ -237,7 +237,7 @@ static int sort (lua_State *L) {
237 237
238 238
239static const luaL_reg tab_funcs[] = { 239static const luaL_reg tab_funcs[] = {
240 {"concat", str_concat}, 240 {"concat", tconcat},
241 {"foreach", foreach}, 241 {"foreach", foreach},
242 {"foreachi", foreachi}, 242 {"foreachi", foreachi},
243 {"getn", getn}, 243 {"getn", getn},