summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2008-10-09 14:57:06 -0700
committerPixel <pixel@nobis-crew.org>2008-10-09 14:57:06 -0700
commite0402b2b38cb866885f0c21282da5b42cc4188b6 (patch)
tree09d21f771cf389741174cb08f6eb6b554bebce70
parent44c7c7ad0052b77e30f3e724f7cba467eacab477 (diff)
Adding the LuaSmtp plugin.
-rw-r--r--src/plugin-luasmtp.cc28
1 files changed, 28 insertions, 0 deletions
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 <LuaSmtp.h>
+
+#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);
+}
+
+}