include/event_callback.h

Wed, 03 Mar 2010 18:19:20 -0600

author
James Snyder <jbsnyder@fanplastic.org>
date
Wed, 03 Mar 2010 18:19:20 -0600
changeset 101
f5369fe8f107
parent 77
ad37f03df138
permissions
-rw-r--r--

Changes to compile on OS X.

- BSD version of install doesn't have -D flag
- stdlib.h should include malloc defs (malloc.h is obsolete)

/* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com>
 * Licensed as LGPL - See doc/COPYING for details */
#ifndef EVENT_CALLBACK
#define EVENT_CALLBACK

#include "luaevent.h"

typedef struct {
	struct event ev;
	le_base* base;
	int callbackRef;
	struct timeval timeout;
} le_callback;

int event_callback_register(lua_State* L);

le_callback* event_callback_push(lua_State* L, int baseIdx, int callbackIdx);

void luaevent_callback(int fd, short event, void* p);

#endif

mercurial