From 68bd2b507fa935eb491479b10e53a97b17994cb5 Mon Sep 17 00:00:00 2001 From: Thomas Harning Jr Date: Fri, 21 Sep 2007 12:55:28 -0400 Subject: Exposed event_buffer checks/get/push operations in prep for buffer_event --- src/event_buffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/event_buffer.c b/src/event_buffer.c index 72c6abe..7eb7260 100644 --- a/src/event_buffer.c +++ b/src/event_buffer.c @@ -18,7 +18,7 @@ static le_buffer* event_buffer_get(lua_State* L, int idx) { /* Obtains an le_buffer structure from a given index AND checks that it hadn't been prematurely freed */ -static le_buffer* event_buffer_check(lua_State* L, int idx) { +le_buffer* event_buffer_check(lua_State* L, int idx) { le_buffer* buf = (le_buffer*)luaL_checkudata(L, idx, EVENT_BUFFER_MT); if(!buf->buffer) luaL_argerror(L, idx, "Attempt to use closed event_buffer object"); @@ -26,7 +26,7 @@ static le_buffer* event_buffer_check(lua_State* L, int idx) { } /* Checks if the given index contains an le_buffer object */ -static int is_event_buffer(lua_State* L, int idx) { +int is_event_buffer(lua_State* L, int idx) { int ret; lua_getmetatable(L, idx); luaL_getmetatable(L, EVENT_BUFFER_MT); @@ -37,7 +37,7 @@ static int is_event_buffer(lua_State* L, int idx) { /* TODO: Use lightuserdata mapping to locate hanging object instances */ /* Pushes the specified evbuffer object onto the stack, attaching a metatable to it */ -static int event_buffer_push(lua_State* L, struct evbuffer* buffer) { +int event_buffer_push(lua_State* L, struct evbuffer* buffer) { le_buffer *buf = (le_buffer*)lua_newuserdata(L, sizeof(le_buffer)); buf->buffer = buffer; luaL_getmetatable(L, EVENT_BUFFER_MT); -- cgit v1.2.3