aboutsummaryrefslogtreecommitdiff
path: root/lobject.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-27 15:47:32 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-27 15:47:32 -0300
commit34b00c16e28c2bbc3e633b4007de956130905ed6 (patch)
treefca960c3f8f1945a052a776722ccef4944b748fa /lobject.c
parent12110dec0eda3813b7609051aedb0cde932fbf93 (diff)
downloadlua-34b00c16e28c2bbc3e633b4007de956130905ed6.tar.gz
lua-34b00c16e28c2bbc3e633b4007de956130905ed6.tar.bz2
lua-34b00c16e28c2bbc3e633b4007de956130905ed6.zip
removed compatibility code with older versions
Diffstat (limited to 'lobject.c')
-rw-r--r--lobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lobject.c b/lobject.c
index d5e9c1ce..f4aa014a 100644
--- a/lobject.c
+++ b/lobject.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.c,v 2.122 2017/12/30 20:46:18 roberto Exp roberto $ 2** $Id: lobject.c,v 2.123 2018/01/28 15:13:26 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*/
@@ -382,12 +382,10 @@ void luaO_tostring (lua_State *L, TValue *obj) {
382 len = lua_integer2str(buff, sizeof(buff), ivalue(obj)); 382 len = lua_integer2str(buff, sizeof(buff), ivalue(obj));
383 else { 383 else {
384 len = lua_number2str(buff, sizeof(buff), fltvalue(obj)); 384 len = lua_number2str(buff, sizeof(buff), fltvalue(obj));
385#if !defined(LUA_COMPAT_FLOATSTRING)
386 if (buff[strspn(buff, "-0123456789")] == '\0') { /* looks like an int? */ 385 if (buff[strspn(buff, "-0123456789")] == '\0') { /* looks like an int? */
387 buff[len++] = lua_getlocaledecpoint(); 386 buff[len++] = lua_getlocaledecpoint();
388 buff[len++] = '0'; /* adds '.0' to result */ 387 buff[len++] = '0'; /* adds '.0' to result */
389 } 388 }
390#endif
391 } 389 }
392 setsvalue(L, obj, luaS_newlstr(L, buff, len)); 390 setsvalue(L, obj, luaS_newlstr(L, buff, len));
393} 391}