blob: feeba34085c26b45dd0b1b4aad2225229085fec8 (
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
|
extern "C" {
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
#include "tclass.h"
#include <stdlib.h>
Tst_A* Tst_A::last;
Tst_B* Tst_B::last;
Tst_C* Tst_C::last;
int main ()
{
Tst_B* b = new Tst_B; // instance used in Lua code
int tolua_tclass_open (lua_State*);
lua_State* L = luaL_newstate();
luaL_openlibs(L);
tolua_tclass_open(L);
if (luaL_dofile(L,"tclass.lua")) {
printf("Error: %s\n",lua_tostring(L,-1));
}
lua_close(L);
delete b;
return 0;
}
|