mirror of
https://github.com/lua/lua
synced 2024-12-27 12:49:43 +03:00
new function `luaL_addstring'
This commit is contained in:
parent
b8d57092eb
commit
4ef14ba280
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lauxlib.c,v 1.34 2000/09/11 17:38:42 roberto Exp roberto $
|
||||
** $Id: lauxlib.c,v 1.35 2000/09/11 20:29:27 roberto Exp roberto $
|
||||
** Auxiliary functions for building Lua libraries
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -178,6 +178,11 @@ void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l) {
|
||||
}
|
||||
|
||||
|
||||
void luaL_addstring (luaL_Buffer *B, const char *s) {
|
||||
luaL_addlstring(B, s, strlen(s));
|
||||
}
|
||||
|
||||
|
||||
void luaL_pushresult (luaL_Buffer *B) {
|
||||
emptybuffer(B);
|
||||
if (B->level == 0)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lauxlib.h,v 1.23 2000/09/11 17:38:42 roberto Exp roberto $
|
||||
** $Id: lauxlib.h,v 1.24 2000/09/11 20:29:27 roberto Exp roberto $
|
||||
** Auxiliary functions for building Lua libraries
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -80,6 +80,7 @@ typedef struct luaL_Buffer {
|
||||
void luaL_buffinit (lua_State *L, luaL_Buffer *B);
|
||||
char *luaL_prepbuffer (luaL_Buffer *B);
|
||||
void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l);
|
||||
void luaL_addstring (luaL_Buffer *B, const char *s);
|
||||
void luaL_addvalue (luaL_Buffer *B);
|
||||
void luaL_pushresult (luaL_Buffer *B);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user