From e652e93f7d73f67c6bb5299c9df14d42b66dba7d Mon Sep 17 00:00:00 2001 From: Thomas Harning Jr Date: Fri, 21 Sep 2007 14:35:11 -0400 Subject: buffer_event is born, albeit w/ deformities. Can construct instances but not use, yet. --- include/buffer_event.h | 21 +++++++++++++++++++++ include/utility.h | 13 +++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 include/buffer_event.h create mode 100644 include/utility.h (limited to 'include') diff --git a/include/buffer_event.h b/include/buffer_event.h new file mode 100644 index 0000000..960b576 --- /dev/null +++ b/include/buffer_event.h @@ -0,0 +1,21 @@ +/* LuaEvent - Copyright (C) 2007 Thomas Harning + * Licensed as LGPL - See doc/COPYING for details */ + #ifndef BUFFER_EVENT_H + #define BUFFER_EVENT_H + +#include "luaevent.h" +#include +#include +#include +#include + +typedef struct { + struct bufferevent* ev; + le_base* base; +} le_bufferevent; + +int buffer_event_register(lua_State* L); +int is_buffer_event(lua_State* L, int idx); +le_bufferevent* buffer_event_check(lua_State* L, int idx); + +#endif diff --git a/include/utility.h b/include/utility.h new file mode 100644 index 0000000..f5afcfc --- /dev/null +++ b/include/utility.h @@ -0,0 +1,13 @@ +/* LuaEvent - Copyright (C) 2007 Thomas Harning + * Licensed as LGPL - See doc/COPYING for details */ +#ifndef UTILITY_H +#define UTILITY_H + +#include + +void le_weak_ref(lua_State* L, void* ptr, int idx); +void le_weak_unref(lua_State* L, void* ptr); +void le_weak_get(lua_State* L, void* ptr); + +void le_register_utility(lua_State* L); +#endif -- cgit v1.2.3