mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-14 15:09:09 +00:00
Update redbean lua example code
This commit is contained in:
parent
451e3f73d9
commit
72e9be5c20
7 changed files with 56 additions and 51 deletions
|
@ -5178,13 +5178,15 @@ static void LuaPrint(lua_State *L) {
|
|||
char *b = 0;
|
||||
const char *s;
|
||||
n = lua_gettop(L);
|
||||
for (i = 1; i <= n; i++) {
|
||||
if (i > 1) appendw(&b, '\t');
|
||||
LuaEncodeLuaData(L, &b, 64, "g", i);
|
||||
if (n > 0) {
|
||||
for (i = 1; i <= n; i++) {
|
||||
if (i > 1) appendw(&b, '\t');
|
||||
LuaEncodeLuaData(L, &b, 64, "g", i);
|
||||
}
|
||||
appendw(&b, '\n');
|
||||
WRITE(1, b, appendz(b).i);
|
||||
free(b);
|
||||
}
|
||||
appendw(&b, '\n');
|
||||
WRITE(1, b, appendz(b).i);
|
||||
free(b);
|
||||
}
|
||||
|
||||
static void LuaInterpreter(lua_State *L) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue