diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-06-21 19:42:06 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-06-21 19:42:06 +0000 |
commit | e79638b70be57501bb9995b24665a109188922fc (patch) | |
tree | 9482f9a9fcd5a461a6b9cf1b9742b3bc0df505bb /plugins/MirLua/src/lua/liolib.c | |
parent | 8ba0d63234b84060efe27542bf317cb9cf50b3af (diff) |
MirLua: lua updated to 5.3.1
git-svn-id: http://svn.miranda-ng.org/main/trunk@14308 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/lua/liolib.c')
-rw-r--r-- | plugins/MirLua/src/lua/liolib.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/plugins/MirLua/src/lua/liolib.c b/plugins/MirLua/src/lua/liolib.c index 4dea39684a..193cac6777 100644 --- a/plugins/MirLua/src/lua/liolib.c +++ b/plugins/MirLua/src/lua/liolib.c @@ -1,5 +1,5 @@ /* -** $Id: liolib.c,v 2.142 2015/01/02 12:50:28 roberto Exp $ +** $Id: liolib.c,v 2.144 2015/04/03 18:41:57 roberto Exp $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ @@ -410,12 +410,6 @@ static int readdigits (RN *rn, int hex) { } -/* access to locale "radix character" (decimal point) */ -#if !defined(l_getlocaledecpoint) -#define l_getlocaledecpoint() (localeconv()->decimal_point[0]) -#endif - - /* ** Read a number: first reads a valid prefix of a numeral into a buffer. ** Then it calls 'lua_stringtonumber' to check whether the format is @@ -425,9 +419,10 @@ static int read_number (lua_State *L, FILE *f) { RN rn; int count = 0; int hex = 0; - char decp[2] = "."; + char decp[2]; rn.f = f; rn.n = 0; - decp[0] = l_getlocaledecpoint(); /* get decimal point from locale */ + decp[0] = lua_getlocaledecpoint(); /* get decimal point from locale */ + decp[1] = '\0'; l_lockfile(rn.f); do { rn.c = l_getc(rn.f); } while (isspace(rn.c)); /* skip spaces */ test2(&rn, "-+"); /* optional signal */ @@ -457,7 +452,7 @@ static int read_number (lua_State *L, FILE *f) { static int test_eof (lua_State *L, FILE *f) { int c = getc(f); ungetc(c, f); /* no-op when c == EOF */ - lua_pushlstring(L, NULL, 0); + lua_pushliteral(L, ""); return (c != EOF); } |