Skip to content

Commit

Permalink
优化xml的输出格式
Browse files Browse the repository at this point in the history
  • Loading branch information
xiyoo0812 committed May 8, 2024
1 parent 8c00657 commit f38514c
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions extend/luaxml/src/luaxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,27 +95,6 @@ namespace luaxml {
}
}

static size_t array_len(lua_State* L, int index) {
index = lua_absindex(L, index);
size_t raw_len = lua_rawlen(L, index);
if (raw_len == 0) {
return 0;
}
lua_guard g(L);
lua_pushnil(L);
while (lua_next(L, index) != 0) {
if (!lua_isinteger(L, -2)) {
return 0;
}
size_t key = lua_tointeger(L, -2);
if (key <= 0 || key > raw_len) {
return 0;
}
lua_pop(L, 1);
}
return raw_len;
}

static void load_elem4lua(lua_State* L, XMLPrinter* printer) {
const char* key = lua_tostring(L, -2);
if (!is_lua_array(L, -1)) {
Expand Down

0 comments on commit f38514c

Please sign in to comment.