static int emptybuffer (luaL_Buffer *B) { size_t l = bufflen(B); if (l == 0) return 0; /* put nothing on stack */ else { lua_pushlstring(B->L, B->buffer, l); B->p = B->buffer; B->lvl++; return 1; } }
static int emptybuffer (luaL_Buffer *B) { size_t l = bufflen(B); if (l == 0) return 0; /* put nothing on stack */ else { if (B->isWide) lua_pushlwstring(B->L, (const lua_WChar*)B->buffer, l / 2); else lua_pushlstring(B->L, B->buffer, l); B->p = B->buffer; B->lvl++; return 1; } }