Skip to content

Commit

Permalink
comment out unused luautils
Browse files Browse the repository at this point in the history
  • Loading branch information
AGulev committed Jan 11, 2024
1 parent 97e1bcd commit 1be391c
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions firebase/src/luautils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ void lua_pushtablestringstring(lua_State* L, const char* key, const char* value)
assert(top == lua_gettop(L));
}

void lua_pushtablestringfunction(lua_State* L, const char* key, lua_CFunction function) {
int top = lua_gettop(L);
lua_pushstring(L, key);
lua_pushcfunction(L, function);
lua_settable(L, -3);
assert(top == lua_gettop(L));
}
// void lua_pushtablestringfunction(lua_State* L, const char* key, lua_CFunction function) {
// int top = lua_gettop(L);
// lua_pushstring(L, key);
// lua_pushcfunction(L, function);
// lua_settable(L, -3);
// assert(top == lua_gettop(L));
// }

void lua_printstack(lua_State* L) {
int n = lua_gettop(L);
for (int i = 1; i <= n; i++) {
dmLogInfo("STACK %d %s %s\r\n", i, lua_tostring(L, i), luaL_typename(L, i));
}
}
// void lua_printstack(lua_State* L) {
// int n = lua_gettop(L);
// for (int i = 1; i <= n; i++) {
// dmLogInfo("STACK %d %s %s\r\n", i, lua_tostring(L, i), luaL_typename(L, i));
// }
// }

void lua_setfieldstringstring(lua_State* L, const char* key, const char* value) {
int top = lua_gettop(L);
lua_pushstring(L, value);
lua_setfield(L, -2, key);
assert(top == lua_gettop(L));
}
// void lua_setfieldstringstring(lua_State* L, const char* key, const char* value) {
// int top = lua_gettop(L);
// lua_pushstring(L, value);
// lua_setfield(L, -2, key);
// assert(top == lua_gettop(L));
// }

void lua_setfieldstringnumber(lua_State* L, const char* key, const int value) {
int top = lua_gettop(L);
lua_pushnumber(L, value);
lua_setfield(L, -2, key);
assert(top == lua_gettop(L));
}
// void lua_setfieldstringnumber(lua_State* L, const char* key, const int value) {
// int top = lua_gettop(L);
// lua_pushnumber(L, value);
// lua_setfield(L, -2, key);
// assert(top == lua_gettop(L));
// }

0 comments on commit 1be391c

Please sign in to comment.