summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-17 16:17:55 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-17 16:17:55 -0300
commit0d31efb365e93cd983d63519f83b46c8898b92c4 (patch)
treec86f9333fea6339342937bb3a4f296626a9f91c8
parentf97c64d7bf4c0f373711795d8faba0e8cd206761 (diff)
downloadlua-0d31efb365e93cd983d63519f83b46c8898b92c4.tar.gz
lua-0d31efb365e93cd983d63519f83b46c8898b92c4.tar.bz2
lua-0d31efb365e93cd983d63519f83b46c8898b92c4.zip
'lua_stringtonum' -> 'lua_stringtonumber'
-rw-r--r--lapi.c4
-rw-r--r--lbaselib.c4
-rw-r--r--liolib.c8
-rw-r--r--lua.h4
4 files changed, 10 insertions, 10 deletions
diff --git a/lapi.c b/lapi.c
index cdf21123..4101f975 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.236 2014/10/07 18:29:13 roberto Exp roberto $ 2** $Id: lapi.c,v 2.237 2014/10/15 14:27:40 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -332,7 +332,7 @@ LUA_API int lua_compare (lua_State *L, int index1, int index2, int op) {
332} 332}
333 333
334 334
335LUA_API size_t lua_stringtonum (lua_State *L, const char *s) { 335LUA_API size_t lua_stringtonumber (lua_State *L, const char *s) {
336 size_t sz = luaO_str2num(s, L->top); 336 size_t sz = luaO_str2num(s, L->top);
337 if (sz != 0) 337 if (sz != 0)
338 api_incr_top(L); 338 api_incr_top(L);
diff --git a/lbaselib.c b/lbaselib.c
index 4b5ff3f0..a6739067 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.301 2014/10/15 14:27:40 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.302 2014/10/17 16:28:21 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -77,7 +77,7 @@ static int luaB_tonumber (lua_State *L) {
77 else { 77 else {
78 size_t l; 78 size_t l;
79 const char *s = lua_tolstring(L, 1, &l); 79 const char *s = lua_tolstring(L, 1, &l);
80 if (s != NULL && lua_stringtonum(L, s) == l + 1) 80 if (s != NULL && lua_stringtonumber(L, s) == l + 1)
81 return 1; /* successful conversion to number */ 81 return 1; /* successful conversion to number */
82 /* else not a number */ 82 /* else not a number */
83 } 83 }
diff --git a/liolib.c b/liolib.c
index bf78d5e1..e16e81f4 100644
--- a/liolib.c
+++ b/liolib.c
@@ -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*/
431static int read_number (lua_State *L, FILE *f) { 431static 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 */
diff --git a/lua.h b/lua.h
index 468110f6..d2bcd5c9 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.317 2014/10/07 18:29:13 roberto Exp roberto $ 2** $Id: lua.h,v 1.318 2014/10/15 14:27:40 roberto Exp roberto $
3** Lua - A Scripting Language 3** Lua - A Scripting Language
4** Lua.org, PUC-Rio, Brazil (http://www.lua.org) 4** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
5** See Copyright Notice at the end of this file 5** See Copyright Notice at the end of this file
@@ -321,7 +321,7 @@ LUA_API int (lua_next) (lua_State *L, int idx);
321LUA_API void (lua_concat) (lua_State *L, int n); 321LUA_API void (lua_concat) (lua_State *L, int n);
322LUA_API void (lua_len) (lua_State *L, int idx); 322LUA_API void (lua_len) (lua_State *L, int idx);
323 323
324LUA_API size_t (lua_stringtonum) (lua_State *L, const char *s); 324LUA_API size_t (lua_stringtonumber) (lua_State *L, const char *s);
325 325
326LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud); 326LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud);
327LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud); 327LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);