From dee0756217fc0e79e79cb51b51e1e80c43289e2d Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 9 Jan 2016 17:11:06 +0000 Subject: MirLua: winapi code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@16069 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/Modules/WinAPI/src/stdafx.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'plugins/MirLua/Modules/WinAPI/src/stdafx.h') diff --git a/plugins/MirLua/Modules/WinAPI/src/stdafx.h b/plugins/MirLua/Modules/WinAPI/src/stdafx.h index f2207236e2..1e67e7c313 100644 --- a/plugins/MirLua/Modules/WinAPI/src/stdafx.h +++ b/plugins/MirLua/Modules/WinAPI/src/stdafx.h @@ -66,4 +66,13 @@ #include #include -#define MYP2HCAST (long) \ No newline at end of file +struct luaM_consts +{ + char *name; + intptr_t value; +}; + + +#define luaM_PushNumberIf(L, a, b) if (b) lua_pushnumber(L, (intptr_t)a); else lua_pushnil(L); +#define luaM_PushStringIf(L, a, b) if (b) lua_pushstring(L, a); else lua_pushnil(L); +#define luaM_CheckPushNumber(L, a) luaM_PushNumberIf(L, a, a) \ No newline at end of file -- cgit v1.2.3