From c4e7cdb541d89142056927ebdfd8f97017d38f45 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 27 Jan 2025 16:09:55 -0300 Subject: Renaming two new functions 'lua_numbertostrbuff' -> 'lua_numbertocstring' 'lua_pushextlstring' -> 'lua_pushexternalstring' --- lauxlib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lauxlib.c') 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) { resizebox(L, -1, len + 1); /* adjust box size to content size */ s = (char*)box->box; /* final buffer address */ s[len] = '\0'; /* add ending zero */ - /* clear box, as 'lua_pushextlstring' will take control over buffer */ + /* clear box, as Lua will take control of the buffer */ box->bsize = 0; box->box = NULL; - lua_pushextlstring(L, s, len, allocf, ud); + lua_pushexternalstring(L, s, len, allocf, ud); lua_closeslot(L, -2); /* close the box */ lua_gc(L, LUA_GCSTEP, len); } @@ -929,7 +929,7 @@ LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) { switch (lua_type(L, idx)) { case LUA_TNUMBER: { char buff[LUA_N2SBUFFSZ]; - lua_numbertostrbuff(L, idx, buff); + lua_numbertocstring(L, idx, buff); lua_pushstring(L, buff); break; } -- cgit v1.2.3-55-g6feb