aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/event_buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/event_buffer.c b/src/event_buffer.c
index 546a596..ff3bad3 100644
--- a/src/event_buffer.c
+++ b/src/event_buffer.c
@@ -187,6 +187,10 @@ int event_buffer_register(lua_State* L) {
luaL_newmetatable(L, EVENT_BUFFER_MT);
lua_pushcfunction(L, event_buffer_gc);
lua_setfield(L, -2, "__gc");
+ lua_pushcfunction(L, event_buffer_get_length);
+ lua_setfield(L, -2, "__len");
+ lua_pushcfunction(L, event_buffer_get_data);
+ lua_setfield(L, -2, "__tostring");
lua_newtable(L);
luaL_register(L, NULL, buffer_funcs);
lua_setfield(L, -2, "__index");