23#ifndef WREPORT_UTILS_LUA_H
24#define WREPORT_UTILS_LUA_H
29#ifdef WREPORT_LUA_REQUIRED
30#error This source requires Lua to compile
42void push_object(lua_State* L, T* obj,
const char* class_name,
46 T** s = (T**)lua_newuserdata(L,
sizeof(T*));
50 if (luaL_newmetatable(L, class_name))
53 lua_pushstring(L,
"__index");
58#if LUA_VERSION_NUM >= 502
59 luaL_setfuncs(L, lib, 0);
61 luaL_register(L, NULL, lib);
65 lua_setmetatable(L, -2);
String functions.
Definition benchmark.h:13