summaryrefslogtreecommitdiff
path: root/src/lj_api.c
diff options
context:
space:
mode:
authorMike Pall <mike>2013-05-13 10:15:07 +0200
committerMike Pall <mike>2013-05-13 10:15:07 +0200
commit8f90a1279e125a8cb9727751f76fb75214208f89 (patch)
treeb65706b5b10231780735fcf80966e14f616f39b7 /src/lj_api.c
parent625ffca739a703906fbc321ef9405514d72480fe (diff)
downloadluajit-8f90a1279e125a8cb9727751f76fb75214208f89.tar.gz
luajit-8f90a1279e125a8cb9727751f76fb75214208f89.tar.bz2
luajit-8f90a1279e125a8cb9727751f76fb75214208f89.zip
Big renaming of string buffer/formatting/conversion functions.
Diffstat (limited to 'src/lj_api.c')
-rw-r--r--src/lj_api.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lj_api.c b/src/lj_api.c
index 0b7855d7..8aaafdc5 100644
--- a/src/lj_api.c
+++ b/src/lj_api.c
@@ -435,7 +435,7 @@ LUA_API const char *lua_tolstring(lua_State *L, int idx, size_t *len)
435 } else if (tvisnumber(o)) { 435 } else if (tvisnumber(o)) {
436 lj_gc_check(L); 436 lj_gc_check(L);
437 o = index2adr(L, idx); /* GC may move the stack. */ 437 o = index2adr(L, idx); /* GC may move the stack. */
438 s = lj_str_fromnumber(L, o); 438 s = lj_strfmt_number(L, o);
439 setstrV(L, o, s); 439 setstrV(L, o, s);
440 } else { 440 } else {
441 if (len != NULL) *len = 0; 441 if (len != NULL) *len = 0;
@@ -454,7 +454,7 @@ LUALIB_API const char *luaL_checklstring(lua_State *L, int idx, size_t *len)
454 } else if (tvisnumber(o)) { 454 } else if (tvisnumber(o)) {
455 lj_gc_check(L); 455 lj_gc_check(L);
456 o = index2adr(L, idx); /* GC may move the stack. */ 456 o = index2adr(L, idx); /* GC may move the stack. */
457 s = lj_str_fromnumber(L, o); 457 s = lj_strfmt_number(L, o);
458 setstrV(L, o, s); 458 setstrV(L, o, s);
459 } else { 459 } else {
460 lj_err_argt(L, idx, LUA_TSTRING); 460 lj_err_argt(L, idx, LUA_TSTRING);
@@ -476,7 +476,7 @@ LUALIB_API const char *luaL_optlstring(lua_State *L, int idx,
476 } else if (tvisnumber(o)) { 476 } else if (tvisnumber(o)) {
477 lj_gc_check(L); 477 lj_gc_check(L);
478 o = index2adr(L, idx); /* GC may move the stack. */ 478 o = index2adr(L, idx); /* GC may move the stack. */
479 s = lj_str_fromnumber(L, o); 479 s = lj_strfmt_number(L, o);
480 setstrV(L, o, s); 480 setstrV(L, o, s);
481 } else { 481 } else {
482 lj_err_argt(L, idx, LUA_TSTRING); 482 lj_err_argt(L, idx, LUA_TSTRING);
@@ -508,7 +508,7 @@ LUA_API size_t lua_objlen(lua_State *L, int idx)
508 } else if (tvisudata(o)) { 508 } else if (tvisudata(o)) {
509 return udataV(o)->len; 509 return udataV(o)->len;
510 } else if (tvisnumber(o)) { 510 } else if (tvisnumber(o)) {
511 GCstr *s = lj_str_fromnumber(L, o); 511 GCstr *s = lj_strfmt_number(L, o);
512 setstrV(L, o, s); 512 setstrV(L, o, s);
513 return s->len; 513 return s->len;
514 } else { 514 } else {