diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2016-12-20 16:37:00 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2016-12-20 16:37:00 -0200 |
commit | 9903dd52a39fbe4531596b1266e226f01769de21 (patch) | |
tree | 98bce931ed24b087fffa52123c8f8c23fe39e4f4 /liolib.c | |
parent | 24f6e236a3346183fe8a946568e6b0cd864abd42 (diff) | |
download | lua-9903dd52a39fbe4531596b1266e226f01769de21.tar.gz lua-9903dd52a39fbe4531596b1266e226f01769de21.tar.bz2 lua-9903dd52a39fbe4531596b1266e226f01769de21.zip |
Using LUAI_UAC* types more consistently on vararg calls
Diffstat (limited to 'liolib.c')
-rw-r--r-- | liolib.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 2.149 2016/05/02 14:03:19 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.150 2016/09/01 16:14:56 roberto Exp roberto $ |
3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -619,8 +619,10 @@ static int g_write (lua_State *L, FILE *f, int arg) { | |||
619 | if (lua_type(L, arg) == LUA_TNUMBER) { | 619 | if (lua_type(L, arg) == LUA_TNUMBER) { |
620 | /* optimization: could be done exactly as for strings */ | 620 | /* optimization: could be done exactly as for strings */ |
621 | int len = lua_isinteger(L, arg) | 621 | int len = lua_isinteger(L, arg) |
622 | ? fprintf(f, LUA_INTEGER_FMT, lua_tointeger(L, arg)) | 622 | ? fprintf(f, LUA_INTEGER_FMT, |
623 | : fprintf(f, LUA_NUMBER_FMT, lua_tonumber(L, arg)); | 623 | (LUAI_UACINT)lua_tointeger(L, arg)) |
624 | : fprintf(f, LUA_NUMBER_FMT, | ||
625 | (LUAI_UACNUMBER)lua_tonumber(L, arg)); | ||
624 | status = status && (len > 0); | 626 | status = status && (len > 0); |
625 | } | 627 | } |
626 | else { | 628 | else { |