mirror of https://github.com/rusefi/lua.git
detail
This commit is contained in:
parent
b261cd110f
commit
c2f065f405
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lobject.c,v 2.14 2005/05/20 15:53:42 roberto Exp roberto $
|
** $Id: lobject.c,v 2.15 2005/05/31 14:25:18 roberto Exp roberto $
|
||||||
** Some generic functions over Lua objects
|
** Some generic functions over Lua objects
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -116,7 +116,9 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) {
|
||||||
incr_top(L);
|
incr_top(L);
|
||||||
switch (*(e+1)) {
|
switch (*(e+1)) {
|
||||||
case 's': {
|
case 's': {
|
||||||
pushstr(L, va_arg(argp, char *));
|
const char *s = va_arg(argp, char *);
|
||||||
|
if (s == NULL) s = "(null)";
|
||||||
|
pushstr(L, s);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'c': {
|
case 'c': {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: ltablib.c,v 1.30 2005/05/16 21:19:00 roberto Exp roberto $
|
** $Id: ltablib.c,v 1.31 2005/05/17 19:49:15 roberto Exp roberto $
|
||||||
** Library for Table Manipulation
|
** Library for Table Manipulation
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -109,7 +109,7 @@ static int tremove (lua_State *L) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int str_concat (lua_State *L) {
|
static int tconcat (lua_State *L) {
|
||||||
luaL_Buffer b;
|
luaL_Buffer b;
|
||||||
size_t lsep;
|
size_t lsep;
|
||||||
const char *sep = luaL_optlstring(L, 2, "", &lsep);
|
const char *sep = luaL_optlstring(L, 2, "", &lsep);
|
||||||
|
@ -237,7 +237,7 @@ static int sort (lua_State *L) {
|
||||||
|
|
||||||
|
|
||||||
static const luaL_reg tab_funcs[] = {
|
static const luaL_reg tab_funcs[] = {
|
||||||
{"concat", str_concat},
|
{"concat", tconcat},
|
||||||
{"foreach", foreach},
|
{"foreach", foreach},
|
||||||
{"foreachi", foreachi},
|
{"foreachi", foreachi},
|
||||||
{"getn", getn},
|
{"getn", getn},
|
||||||
|
|
Loading…
Reference in New Issue