summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_database.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/m_database.cpp')
-rw-r--r--plugins/MirLua/src/m_database.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp
index 57846c99de..d6b7207cfb 100644
--- a/plugins/MirLua/src/m_database.cpp
+++ b/plugins/MirLua/src/m_database.cpp
@@ -665,16 +665,17 @@ LUAMOD_API int luaopen_m_database(lua_State *L)
lua_pop(L, 1);
MT<DBEVENTINFO>(L, MT_DBEVENTINFO)
- .Field(&DBEVENTINFO::szModule, "Module", LUA_TSTRINGA)
- .Field(&DBEVENTINFO::timestamp, "Timestamp", LUA_TINTEGER)
- .Field(&DBEVENTINFO::eventType, "Type", LUA_TINTEGER)
- .Field(&DBEVENTINFO::flags, "Flags", LUA_TINTEGER)
- .Field(&DBEVENTINFO::cbBlob, "Length", LUA_TINTEGER)
- .Field(&DBEVENTINFO::pBlob, "Blob", LUA_TLIGHTUSERDATA);
+ .Field(std::function<void*(DBEVENTINFO*)>([](DBEVENTINFO* p) { return p->szModule; }), "Module", LUA_TSTRINGA)
+ .Field(std::function<void*(DBEVENTINFO*)>([](DBEVENTINFO* p) { return (void*)p->timestamp; }), "Timestamp", LUA_TINTEGER)
+ .Field(std::function<void*(DBEVENTINFO*)>([](DBEVENTINFO* p) { return (void*)p->eventType; }), "Type", LUA_TINTEGER)
+ .Field(std::function<void*(DBEVENTINFO*)>([](DBEVENTINFO* p) { return (void*)p->flags; }), "Flags", LUA_TINTEGER)
+ .Field(std::function<void*(DBEVENTINFO*)>([](DBEVENTINFO* p) { return (void*)p->cbBlob; }), "Length", LUA_TINTEGER)
+ .Field(std::function<void*(DBEVENTINFO*)>([](DBEVENTINFO* p) { return p->pBlob; }), "Blob", LUA_TLIGHTUSERDATA);
+
lua_pop(L, 1);
MT<CONTACTINFO>(L, "CONTACTINFO")
- .Field(&CONTACTINFO::hContact, "hContact", LUA_TINTEGER)
+ .Field(std::function<void*(CONTACTINFO*)>([](CONTACTINFO* p) { return (void*)p->hContact; }), "hContact", LUA_TINTEGER)
.Method(ci__index, "__index");
lua_pop(L, 1);