From 633e8865ff3aebca4e4e02a0a39d045c1be44c45 Mon Sep 17 00:00:00 2001 From: xiyoo0812 Date: Sun, 5 May 2024 22:18:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8B=A5=E5=B9=B2=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/luaxml/src/luaxml.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extend/luaxml/src/luaxml.cpp b/extend/luaxml/src/luaxml.cpp index 4433f0e3..e30d75f9 100644 --- a/extend/luaxml/src/luaxml.cpp +++ b/extend/luaxml/src/luaxml.cpp @@ -7,7 +7,7 @@ using namespace tinyxml2; namespace luaxml { - static void save2lua_elem(lua_State* L, const XMLElement* elem) { + static void push_elem2lua(lua_State* L, const XMLElement* elem) { int index = 1; while (elem) { lua_createtable(L, 0, 4); @@ -30,7 +30,7 @@ namespace luaxml { const XMLElement* child = elem->FirstChildElement(); if (child) { lua_newtable(L); - save2lua_elem(L, child); + push_elem2lua(L, child); lua_setfield(L, -2, "_elems"); } lua_seti(L, -2, index++); @@ -46,7 +46,7 @@ namespace luaxml { return 2; } lua_newtable(L); - save2lua_elem(L, doc.RootElement()); + push_elem2lua(L, doc.RootElement()); return 1; } @@ -58,7 +58,7 @@ namespace luaxml { return 2; } lua_newtable(L); - save2lua_elem(L, doc.RootElement()); + push_elem2lua(L, doc.RootElement()); return 1; }