diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-17 16:17:55 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-17 16:17:55 -0300 |
commit | 0d31efb365e93cd983d63519f83b46c8898b92c4 (patch) | |
tree | c86f9333fea6339342937bb3a4f296626a9f91c8 /liolib.c | |
parent | f97c64d7bf4c0f373711795d8faba0e8cd206761 (diff) | |
download | lua-0d31efb365e93cd983d63519f83b46c8898b92c4.tar.gz lua-0d31efb365e93cd983d63519f83b46c8898b92c4.tar.bz2 lua-0d31efb365e93cd983d63519f83b46c8898b92c4.zip |
'lua_stringtonum' -> 'lua_stringtonumber'
Diffstat (limited to 'liolib.c')
-rw-r--r-- | liolib.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 2.132 2014/10/15 14:27:40 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.133 2014/10/17 16:28:21 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 | */ |
@@ -425,8 +425,8 @@ static int readdigits (RN *rn, int hex) { | |||
425 | 425 | ||
426 | /* | 426 | /* |
427 | ** Read a number: first reads a valid prefix of a numeral into a buffer. | 427 | ** Read a number: first reads a valid prefix of a numeral into a buffer. |
428 | ** Then it calls 'lua_stringtonum' to check whether the format is correct | 428 | ** Then it calls 'lua_stringtonumber' to check whether the format is |
429 | ** and to convert it to a Lua number | 429 | ** correct and to convert it to a Lua number |
430 | */ | 430 | */ |
431 | static int read_number (lua_State *L, FILE *f) { | 431 | static int read_number (lua_State *L, FILE *f) { |
432 | RN rn; | 432 | RN rn; |
@@ -452,7 +452,7 @@ static int read_number (lua_State *L, FILE *f) { | |||
452 | ungetc(rn.c, rn.f); /* unread look-ahead char */ | 452 | ungetc(rn.c, rn.f); /* unread look-ahead char */ |
453 | l_unlockfile(rn.f); | 453 | l_unlockfile(rn.f); |
454 | rn.buff[rn.n] = '\0'; /* finish string */ | 454 | rn.buff[rn.n] = '\0'; /* finish string */ |
455 | if (lua_stringtonum(L, rn.buff)) /* is this a valid number? */ | 455 | if (lua_stringtonumber(L, rn.buff)) /* is this a valid number? */ |
456 | return 1; /* ok */ | 456 | return 1; /* ok */ |
457 | else { /* invalid format */ | 457 | else { /* invalid format */ |
458 | lua_pushnil(L); /* "result" to be removed */ | 458 | lua_pushnil(L); /* "result" to be removed */ |