Skip to content

Commit

Permalink
fix(dev-cli): remove lua metering until solution is found for backwar…
Browse files Browse the repository at this point in the history
…ds compatiblity
  • Loading branch information
PeterFarber committed Oct 18, 2024
1 parent ba4cdb8 commit 4b625d2
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions dev-cli/container/src/aolibc/aostdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,26 +96,26 @@ int munmap(void* addr, size_t length) {
return 0;
}
*/
EM_JS(int, metering_gasUsed, (), {
return Module.gas.used;
});

static int gasUsed(lua_State *L)
{
lua_pushnumber(L, metering_gasUsed());

return 1;
}

// Library registration function
static const struct luaL_Reg aolib_funcs[] = {
{"gasUsed", gasUsed},
{NULL, NULL} /* Sentinel */
};

// Initialization function
int luaopen_metering(lua_State *L)
{
luaL_newlib(L, aolib_funcs);
return 1;
}
// EM_JS(int, metering_gasUsed, (), {
// return Module.gas.used;
// });

// static int gasUsed(lua_State *L)
// {
// lua_pushnumber(L, metering_gasUsed());

// return 1;
// }

// // Library registration function
// static const struct luaL_Reg aolib_funcs[] = {
// {"gasUsed", gasUsed},
// {NULL, NULL} /* Sentinel */
// };

// // Initialization function
// int luaopen_metering(lua_State *L)
// {
// luaL_newlib(L, aolib_funcs);
// return 1;
// }

0 comments on commit 4b625d2

Please sign in to comment.