Debian Codegraph @

3rdparty/toluapp/src/tests/tvariable.c

raw
1 #include "lualib.h"
2 #include "lauxlib.h"
3
4 #include "tvariable.h"
5
6 int i = 1;
7 float f = 2.0f;;
8 double d = 3.0;
9 char* s = "Hello world";
10 void* v = (void*)1;
11 char n[64] = "Hi there";
12
13 A a = {11,12.0f,13.0,"Hello world from class",(void*)1,"Hi there from class"};
14 B* b;
15 U u;
16
17 int mi = 21;
18 float mf = 22.0f;
19 double md = 23.0;
20 char* ms = "Hello world in module";
21 void* mv = NULL;
22 char mn[64] = "Hi there in module";
23 A ma = {31,32.0f,33.0,"Hello world from class in module",
24 NULL,"Hi there from class in module"};
25 B* mb;
26
27 int main (void)
28 {
29 int tolua_tvariable_open (lua_State*);
30 lua_State* L = lua_open();
31
32 B bb = {a,NULL};
33 B bbb = {ma,&bb};
34 b = &bb;
35 mb = &bbb;
36
37
38 luaopen_base(L);
39 tolua_tvariable_open(L);
40
41 lua_dofile(L,"tvariable.lua");
42
43 lua_close(L);
44 return 0;
45 }
46