summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_database.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-07-01 07:43:28 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-07-01 07:43:28 +0000
commitdba6ba812fadfef61e7adf61ff2a65e03ed36789 (patch)
tree25c126b497d9964d1c43a2f06030f5d4612b351b /plugins/MirLua/src/m_database.cpp
parentad5f64dcd8dc7944e85208d6ef32eb5adbb4ffe6 (diff)
MirLua: mlua_metatable rewritted
git-svn-id: http://svn.miranda-ng.org/main/trunk@17055 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/m_database.cpp')
-rw-r--r--plugins/MirLua/src/m_database.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp
index b9318c1047..fab5f86d57 100644
--- a/plugins/MirLua/src/m_database.cpp
+++ b/plugins/MirLua/src/m_database.cpp
@@ -589,6 +589,7 @@ static luaL_Reg databaseApi[] =
#define MT_DBCONTACTWRITESETTING "DBCONTACTWRITESETTING"
+template <>
int MT<DBCONTACTWRITESETTING>::Index(lua_State *L, DBCONTACTWRITESETTING *dbcw)
{
const char *key = luaL_checkstring(L, 2);
@@ -639,6 +640,7 @@ int MT<DBCONTACTWRITESETTING>::Index(lua_State *L, DBCONTACTWRITESETTING *dbcw)
#define MT_DBEVENTINFO "DBEVENTINFO"
+template <>
void MT<DBEVENTINFO>::Init(lua_State *L, DBEVENTINFO **dbei)
{
MEVENT hDbEvent = luaL_checkinteger(L, 1);
@@ -650,6 +652,7 @@ void MT<DBEVENTINFO>::Init(lua_State *L, DBEVENTINFO **dbei)
db_event_get((MEVENT)hDbEvent, (*dbei));
}
+template <>
int MT<DBEVENTINFO>::Index(lua_State *L, DBEVENTINFO *dbei)
{
const char *key = luaL_checkstring(L, 2);
@@ -669,6 +672,7 @@ int MT<DBEVENTINFO>::Index(lua_State *L, DBEVENTINFO *dbei)
return 1;
}
+template <>
void MT<DBEVENTINFO>::Free(lua_State*, DBEVENTINFO **dbei)
{
mir_free((*dbei)->pBlob);