External strings

Strings can use external buffers to store their contents.
This commit is contained in:
Roberto Ierusalimschy
2023-11-09 17:05:42 -03:00
parent 7f4906f565
commit 024f9064f1
9 changed files with 195 additions and 14 deletions

2
lua.h
View File

@@ -244,6 +244,8 @@ LUA_API void (lua_pushnil) (lua_State *L);
LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n);
LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n);
LUA_API const char *(lua_pushlstring) (lua_State *L, const char *s, size_t len);
LUA_API const char *(lua_pushextlstring) (lua_State *L,
const char *s, size_t len, lua_Alloc falloc, void *ud);
LUA_API const char *(lua_pushstring) (lua_State *L, const char *s);
LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt,
va_list argp);