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.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp
index 8ac3d99a35..262b338722 100644
--- a/plugins/MirLua/src/m_database.cpp
+++ b/plugins/MirLua/src/m_database.cpp
@@ -456,6 +456,16 @@ static int SettingsChangedHookEventObjParam(void *obj, WPARAM wParam, LPARAM lPa
return res;
}
+static luaM_const consts[] =
+{
+ { "DBVT_BYTE", DBVT_BYTE },
+ { "DBVT_WORD", DBVT_WORD },
+ { "DBVT_DWORD", DBVT_DWORD },
+ { "DBVT_ASCIIZ", DBVT_ASCIIZ },
+ { "DBVT_UTF8", DBVT_UTF8 },
+ { "DBVT_WCHAR", DBVT_WCHAR }
+};
+
static luaL_Reg databaseApi[] =
{
{ "FindFirstContact", lua_FindFirstContact },
@@ -661,7 +671,7 @@ static int ci__index(lua_State *L)
LUAMOD_API int luaopen_m_database(lua_State *L)
{
luaL_newlib(L, databaseApi);
-
+ luaM_loadConsts(L, consts);
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)