src/luaevent.c

changeset 26
a117895e867c
parent 24
cda8e1a2dfa2
child 41
fce1995f0db8
child 63
1b8cbf640378
equal deleted inserted replaced
25:5778073d2903 26:a117895e867c
1 /* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com> 1 /* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com>
2 * Licensed as LGPL - See doc/COPYING for details */ 2 * Licensed as LGPL - See doc/COPYING for details */
3 3
4 #include "luaevent.h" 4 #include "luaevent.h"
5 #include "event_callback.h" 5 #include "event_callback.h"
6 #include "event_buffer.h"
6 7
7 #include <lua.h> 8 #include <lua.h>
8 #include <lauxlib.h> 9 #include <lauxlib.h>
9 #include <assert.h> 10 #include <assert.h>
10 11
117 118
118 /* Verified ok */ 119 /* Verified ok */
119 int luaopen_luaevent_core(lua_State* L) { 120 int luaopen_luaevent_core(lua_State* L) {
120 /* Register external items */ 121 /* Register external items */
121 event_callback_register(L); 122 event_callback_register(L);
123 event_buffer_register(L);
122 /* Setup metatable */ 124 /* Setup metatable */
123 luaL_newmetatable(L, EVENT_BASE_MT); 125 luaL_newmetatable(L, EVENT_BASE_MT);
124 lua_newtable(L); 126 lua_newtable(L);
125 luaL_register(L, NULL, base_funcs); 127 luaL_register(L, NULL, base_funcs);
126 lua_setfield(L, -2, "__index"); 128 lua_setfield(L, -2, "__index");

mercurial