aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-27 16:09:55 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-27 16:09:55 -0300
commitc4e7cdb541d89142056927ebdfd8f97017d38f45 (patch)
tree1e356b5b4eed75d86050bab3f12026d5a70697b6 /lauxlib.c
parent7d7ae8781e64e2b3b212d5c7b7c1b98b694df5ef (diff)
downloadlua-c4e7cdb541d89142056927ebdfd8f97017d38f45.tar.gz
lua-c4e7cdb541d89142056927ebdfd8f97017d38f45.tar.bz2
lua-c4e7cdb541d89142056927ebdfd8f97017d38f45.zip
Renaming two new functions
'lua_numbertostrbuff' -> 'lua_numbertocstring' 'lua_pushextlstring' -> 'lua_pushexternalstring'
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lauxlib.c b/lauxlib.c
index d37d2f8c..5bca1816 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -622,9 +622,9 @@ LUALIB_API void luaL_pushresult (luaL_Buffer *B) {
622 resizebox(L, -1, len + 1); /* adjust box size to content size */ 622 resizebox(L, -1, len + 1); /* adjust box size to content size */
623 s = (char*)box->box; /* final buffer address */ 623 s = (char*)box->box; /* final buffer address */
624 s[len] = '\0'; /* add ending zero */ 624 s[len] = '\0'; /* add ending zero */
625 /* clear box, as 'lua_pushextlstring' will take control over buffer */ 625 /* clear box, as Lua will take control of the buffer */
626 box->bsize = 0; box->box = NULL; 626 box->bsize = 0; box->box = NULL;
627 lua_pushextlstring(L, s, len, allocf, ud); 627 lua_pushexternalstring(L, s, len, allocf, ud);
628 lua_closeslot(L, -2); /* close the box */ 628 lua_closeslot(L, -2); /* close the box */
629 lua_gc(L, LUA_GCSTEP, len); 629 lua_gc(L, LUA_GCSTEP, len);
630 } 630 }
@@ -929,7 +929,7 @@ LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) {
929 switch (lua_type(L, idx)) { 929 switch (lua_type(L, idx)) {
930 case LUA_TNUMBER: { 930 case LUA_TNUMBER: {
931 char buff[LUA_N2SBUFFSZ]; 931 char buff[LUA_N2SBUFFSZ];
932 lua_numbertostrbuff(L, idx, buff); 932 lua_numbertocstring(L, idx, buff);
933 lua_pushstring(L, buff); 933 lua_pushstring(L, buff);
934 break; 934 break;
935 } 935 }