aboutsummaryrefslogtreecommitdiff
path: root/lobject.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-06-04 16:36:42 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-06-04 16:36:42 -0300
commit6fb0b1135090b1e4543438c56ae3e444abb5477d (patch)
tree95493cdd6da2474b448f31becc4434a72e354eae /lobject.c
parent932e7fb0e1b35758bd96361479ca3ddab3fc43da (diff)
downloadlua-6fb0b1135090b1e4543438c56ae3e444abb5477d.tar.gz
lua-6fb0b1135090b1e4543438c56ae3e444abb5477d.tar.bz2
lua-6fb0b1135090b1e4543438c56ae3e444abb5477d.zip
string contatenation handles conversion of integers to strings +
floats always format as floats (with decimal dot or exponent)
Diffstat (limited to 'lobject.c')
-rw-r--r--lobject.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lobject.c b/lobject.c
index 8a70c2c2..0d66110c 100644
--- a/lobject.c
+++ b/lobject.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.c,v 2.64 2013/05/26 14:43:35 roberto Exp roberto $ 2** $Id: lobject.c,v 2.65 2013/05/27 17:42:38 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*/
@@ -282,14 +282,11 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) {
282 break; 282 break;
283 } 283 }
284 case 'd': { 284 case 'd': {
285 setivalue(L->top++, va_arg(argp, int)); 285 setivalue(L->top++, cast_int(va_arg(argp, int)));
286 break; 286 break;
287 } 287 }
288 case 'I': { 288 case 'I': {
289 char buff[LUA_MAXINTEGER2STR]; 289 setivalue(L->top++, cast_integer(va_arg(argp, lua_Integer)));
290 lua_Integer i = cast(lua_Integer, va_arg(argp, lua_Integer));
291 int l = lua_integer2str(buff, i);
292 pushstr(L, buff, l);
293 break; 290 break;
294 } 291 }
295 case 'f': { 292 case 'f': {