summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_database.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-01-16 09:31:34 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-01-16 09:31:34 +0000
commit66690d50556a16c0ce56b7c6b9c12c33d24ed158 (patch)
tree4d9a77eb4cd6107b2e2d6d88c77b5842558ecf1e /plugins/MirLua/src/m_database.cpp
parentdcf8d6da92c7b0873c50317ea74ddebbe54f5055 (diff)
MirLua: code optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@16098 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/m_database.cpp')
-rw-r--r--plugins/MirLua/src/m_database.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp
index d6b7207cfb..e3c6e811fe 100644
--- a/plugins/MirLua/src/m_database.cpp
+++ b/plugins/MirLua/src/m_database.cpp
@@ -661,21 +661,23 @@ LUAMOD_API int luaopen_m_database(lua_State *L)
luaL_newlib(L, databaseApi);
MT<DBCONTACTWRITESETTING>(L, MT_DBCONTACTWRITESETTING)
+ //.Field(LFUNC(DBCONTACTWRITESETTING, [](DBCONTACTWRITESETTING *p) { return p->szModule; }), "Module", LUA_TSTRINGA)
+ //.Field(LFUNC(DBCONTACTWRITESETTING, [](DBCONTACTWRITESETTING *p) { return p->szSetting; }), "Setting", LUA_TSTRINGA)
.Method(dbcw__index, "__index");
lua_pop(L, 1);
MT<DBEVENTINFO>(L, MT_DBEVENTINFO)
- .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);
+ .Field(LFUNC(DBEVENTINFO, [](DBEVENTINFO* p) { return p->szModule; }), "Module", LUA_TSTRINGA)
+ .Field(LFUNC(DBEVENTINFO, [](DBEVENTINFO* p) { return (void*)p->timestamp; }), "Timestamp", LUA_TINTEGER)
+ .Field(LFUNC(DBEVENTINFO, [](DBEVENTINFO* p) { return (void*)p->eventType; }), "Type", LUA_TINTEGER)
+ .Field(LFUNC(DBEVENTINFO, [](DBEVENTINFO* p) { return (void*)p->flags; }), "Flags", LUA_TINTEGER)
+ .Field(LFUNC(DBEVENTINFO, [](DBEVENTINFO* p) { return (void*)p->cbBlob; }), "Length", LUA_TINTEGER)
+ .Field(LFUNC(DBEVENTINFO, [](DBEVENTINFO* p) { return p->pBlob; }), "Blob", LUA_TLIGHTUSERDATA);
lua_pop(L, 1);
MT<CONTACTINFO>(L, "CONTACTINFO")
- .Field(std::function<void*(CONTACTINFO*)>([](CONTACTINFO* p) { return (void*)p->hContact; }), "hContact", LUA_TINTEGER)
+ .Field(LFUNC(CONTACTINFO, [](CONTACTINFO* p) { return (void*)p->hContact; }), "hContact", LUA_TINTEGER)
.Method(ci__index, "__index");
lua_pop(L, 1);