Avoid macros luaL_loadbuffer and luaL_loadfile

Use luaL_loadbufferx and luaL_loadfilex instead, being explicit about
whether to accept binary chunks.
This commit is contained in:
Roberto I
2026-04-07 13:42:34 -03:00
parent c037162a1a
commit 29cf284089
6 changed files with 17 additions and 15 deletions

View File

@@ -874,7 +874,7 @@ LUALIB_API int luaL_loadbufferx (lua_State *L, const char *buff, size_t size,
LUALIB_API int luaL_loadstring (lua_State *L, const char *s) {
return luaL_loadbuffer(L, s, strlen(s), s);
return luaL_loadbufferx(L, s, strlen(s), s, "t");
}
/* }====================================================== */