summaryrefslogtreecommitdiff
path: root/src/plugin-luahandle.cc
blob: c1cd3f12d74a1b8e7b70483294fdaa97ed6a64d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <LuaHandle.h>

#ifdef FROM_LUAINTERFACE
#define NO_DLL
#endif

#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;
    LuaInput::pushconstruct(L);
    LuaOutput::pushconstruct(L);
    LuaBuffer::pushconstruct(L);
    LuaHandleLua::pushconstruct(L);
    LuaHandle::pushconstruct(L);
}

extern "C" {

#ifndef NO_DLL
WEAK void init_plugin(Lua * L) {
    _init_plugin(L);
}
#endif

void luahandle_init(Lua * L) {
    _init_plugin(L);
}

}