From e0402b2b38cb866885f0c21282da5b42cc4188b6 Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 9 Oct 2008 14:57:06 -0700 Subject: Adding the LuaSmtp plugin. --- src/plugin-luasmtp.cc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/plugin-luasmtp.cc (limited to 'src') diff --git a/src/plugin-luasmtp.cc b/src/plugin-luasmtp.cc new file mode 100644 index 0000000..4c62060 --- /dev/null +++ b/src/plugin-luasmtp.cc @@ -0,0 +1,28 @@ +#include + +#ifndef WIN32 +#define WEAK __attribute__ ((weak)) +#else +#define WEAK +#endif + +static void _init_plugin(Lua * L) { + static bool done = false; + if (done) return; + done = true; + LuaLuaMailHandler::pushstatics(L); +} + +extern "C" { + +#ifndef NO_DLL +WEAK void init_plugin(Lua * L) { + _init_plugin(L); +} +#endif + +void luasmtp_init(Lua * L) { + _init_plugin(L); +} + +} -- cgit v1.2.3