From c598987f83e50e0b678e89cd507a5a284a18b62a Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Thu, 16 Jul 2015 21:18:54 +0000 Subject: MirLua: - lua_pushliteral for literals - added m_protocol module - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@14580 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_database.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'plugins/MirLua/src/m_database.cpp') diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp index 8d05a605f3..a1cf6f1dc6 100644 --- a/plugins/MirLua/src/m_database.cpp +++ b/plugins/MirLua/src/m_database.cpp @@ -89,22 +89,22 @@ static int lua_GetEvent(lua_State *L) } lua_newtable(L); - lua_pushstring(L, "Module"); + lua_pushliteral(L, "Module"); lua_pushstring(L, ptrA(mir_utf8encode(dbei.szModule))); lua_settable(L, -3); - lua_pushstring(L, "Timestamp"); + lua_pushliteral(L, "Timestamp"); lua_pushnumber(L, dbei.timestamp); lua_settable(L, -3); - lua_pushstring(L, "Type"); + lua_pushliteral(L, "Type"); lua_pushinteger(L, dbei.eventType); lua_settable(L, -3); - lua_pushstring(L, "Flags"); + lua_pushliteral(L, "Flags"); lua_pushinteger(L, dbei.flags); lua_settable(L, -3); - lua_pushstring(L, "Length"); + lua_pushliteral(L, "Length"); lua_pushnumber(L, dbei.cbBlob); lua_settable(L, -3); - lua_pushstring(L, "Blob"); + lua_pushliteral(L, "Blob"); lua_newtable(L); for (DWORD i = 0; i < dbei.cbBlob; i++) { @@ -292,13 +292,13 @@ static int SettingsChangedHookEventObjParam(void *obj, WPARAM wParam, LPARAM lPa DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam; lua_newtable(L); - lua_pushstring(L, "Module"); + lua_pushliteral(L, "Module"); lua_pushstring(L, dbcws->szModule); lua_settable(L, -3); - lua_pushstring(L, "Setting"); + lua_pushliteral(L, "Setting"); lua_pushstring(L, dbcws->szSetting); lua_settable(L, -3); - lua_pushstring(L, "Value"); + lua_pushliteral(L, "Value"); switch (dbcws->value.type) { case DBVT_BYTE: @@ -358,13 +358,13 @@ static int lua_DecodeDBCONTACTWRITESETTING(lua_State *L) DBCONTACTWRITESETTING *pDBCWS = (DBCONTACTWRITESETTING*)lua_tointeger(L, 1); lua_newtable(L); - lua_pushstring(L, "Module"); + lua_pushliteral(L, "Module"); lua_pushstring(L, pDBCWS->szModule); lua_settable(L, -3); - lua_pushstring(L, "Setting"); + lua_pushliteral(L, "Setting"); lua_pushstring(L, pDBCWS->szSetting); lua_settable(L, -3); - lua_pushstring(L, "Value"); + lua_pushliteral(L, "Value"); switch (pDBCWS->value.type) { case DBVT_BYTE: -- cgit v1.2.3