summaryrefslogtreecommitdiff
path: root/src/plugin-lualibs.cc
blob: 5a5de03118e9df62dbdba0d4104a5efd489eb467 (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
#include <loadlualibs.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;
    LoadLuaLibs(L);
}

extern "C" {

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

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

}