Use new macro 'pushvfstring' inside 'luaO_pushfstring'

26 views
Skip to first unread message

Jure Bagić

unread,
Dec 5, 2025, 6:43:26 PM (11 days ago) Dec 5
to lua-l
lobject.c:662 function 'luaO_pushfstring'
> const char *luaO_pushfstring (lua_State *L, const char *fmt, ...) {
> const char *msg;
> va_list argp;
> va_start(argp, fmt);
> msg = luaO_pushvfstring(L, fmt, argp);
> va_end(argp);
> if (msg == NULL) /* error? */
> luaD_throw(L, LUA_ERRMEM);
> return msg;
> }

maybe use new macro 'pushvfstring' instead, like so:
> const char *luaO_pushfstring (lua_State *L, const char *fmt, ...) {
> const char *msg;
> va_list argp;
> pushvfstring(L, argp, fmt, msg);
> return msg;
> }

-- Jure
signature.asc
Reply all
Reply to author
Forward
0 new messages