File: init.c

package info (click to toggle)
lcm 1.3.1%2Brepack1-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,848 kB
  • sloc: ansic: 16,186; java: 6,843; cs: 2,266; cpp: 1,594; python: 989; makefile: 352; xml: 252; sh: 59
file content (49 lines) | stat: -rw-r--r-- 741 bytes parent folder | download | duplicates (5)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifdef __cplusplus
extern "C" {
#endif
#include "lua.h"
#ifdef __cplusplus
}
#endif

#include "lualcm_lcm.h"
#include "lualcm_hash.h"
#include "lualcm_pack.h"

int luaopen_lcm_lcm(lua_State* L) {
  ll_lcm_makemetatable(L);
  ll_lcm_register_new(L);

  return 1;
}

int luaopen_lcm__hash(lua_State* L) {
  ll_hash_makemetatable(L);
  ll_hash_register_new(L);

  return 1;
}

int luaopen_lcm__pack(lua_State* L) {
  ll_pack_register(L);

  return 1;
}

int luaopen_lcm(lua_State* L) {
  lua_newtable(L);

  lua_pushstring(L, "lcm");
  luaopen_lcm_lcm(L);
  lua_rawset(L, -3);

  lua_pushstring(L, "_hash");
  luaopen_lcm__hash(L);
  lua_rawset(L, -3);

  lua_pushstring(L, "_pack");
  luaopen_lcm__pack(L);
  lua_rawset(L, -3);

  return 1;
}