ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/EV/EVAPI.h
(Generate patch)

Comparing EV/EV/EVAPI.h (file contents):
Revision 1.28 by root, Sat Dec 8 02:52:29 2007 UTC vs.
Revision 1.29 by root, Sat Dec 8 03:53:35 2007 UTC

28 28
29struct EVAPI { 29struct EVAPI {
30 I32 ver; 30 I32 ver;
31 I32 rev; 31 I32 rev;
32#define EV_API_VERSION 2 32#define EV_API_VERSION 2
33#define EV_API_REVISION 0 33#define EV_API_REVISION 1
34 34
35 /* perl fh or fd int to fd */ 35 /* perl fh or fd int to fd */
36 int (*sv_fileno) (SV *fh); 36 int (*sv_fileno) (SV *fh);
37 /* signal number/name to signum */ 37 /* signal number/name to signum */
38 int (*sv_signum) (SV *fh); 38 int (*sv_signum) (SV *fh);
39 39
40 /* same as libev functions */ 40 /* same as libev functions */
41 ev_tstamp (*now)(void); 41 ev_tstamp (*now)(EV_P);
42 ev_tstamp (*(time))(void); 42 ev_tstamp (*(time))(void);
43 unsigned int (*backend)(void); 43 unsigned int (*backend)(EV_P);
44 void (*loop)(int flags); 44 void (*loop)(EV_P_ int flags);
45 void (*unloop)(int how); 45 void (*unloop)(EV_P_ int how);
46 void (*ref)(void); 46 void (*ref)(EV_P);
47 void (*unref)(void); 47 void (*unref)(EV_P);
48 void (*once)(int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg); 48 void (*once)(EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg);
49 void (*io_start)(struct ev_io *); 49 void (*io_start)(EV_P_ struct ev_io *);
50 void (*io_stop) (struct ev_io *); 50 void (*io_stop) (EV_P_ struct ev_io *);
51 void (*timer_start)(struct ev_timer *); 51 void (*timer_start)(EV_P_ struct ev_timer *);
52 void (*timer_stop) (struct ev_timer *); 52 void (*timer_stop) (EV_P_ struct ev_timer *);
53 void (*timer_again)(struct ev_timer *); 53 void (*timer_again)(EV_P_ struct ev_timer *);
54 void (*periodic_start)(struct ev_periodic *); 54 void (*periodic_start)(EV_P_ struct ev_periodic *);
55 void (*periodic_stop) (struct ev_periodic *); 55 void (*periodic_stop) (EV_P_ struct ev_periodic *);
56 void (*signal_start)(struct ev_signal *); 56 void (*signal_start)(EV_P_ struct ev_signal *);
57 void (*signal_stop) (struct ev_signal *); 57 void (*signal_stop) (EV_P_ struct ev_signal *);
58 void (*child_start)(struct ev_child *); 58 void (*child_start)(EV_P_ struct ev_child *);
59 void (*child_stop) (struct ev_child *); 59 void (*child_stop) (EV_P_ struct ev_child *);
60 void (*stat_start)(struct ev_stat *); 60 void (*stat_start)(EV_P_ struct ev_stat *);
61 void (*stat_stop) (struct ev_stat *); 61 void (*stat_stop) (EV_P_ struct ev_stat *);
62 void (*stat_stat) (struct ev_stat *); 62 void (*stat_stat) (EV_P_ struct ev_stat *);
63 void (*idle_start)(struct ev_idle *); 63 void (*idle_start)(EV_P_ struct ev_idle *);
64 void (*idle_stop) (struct ev_idle *); 64 void (*idle_stop) (EV_P_ struct ev_idle *);
65 void (*prepare_start)(struct ev_prepare *); 65 void (*prepare_start)(EV_P_ struct ev_prepare *);
66 void (*prepare_stop) (struct ev_prepare *); 66 void (*prepare_stop) (EV_P_ struct ev_prepare *);
67 void (*check_start)(struct ev_check *); 67 void (*check_start)(EV_P_ struct ev_check *);
68 void (*check_stop) (struct ev_check *); 68 void (*check_stop) (EV_P_ struct ev_check *);
69 void *embed_start_dummy; 69 void (*clear_pending)(EV_P_ void *w, int invoke);
70 void *embed_stop_dummy;
71 void *embed_sweep_dummy;
72}; 70};
73 71
74#if !EV_PROTOTYPES 72#if !EV_PROTOTYPES
75# define sv_fileno(sv) GEVAPI->sv_fileno (sv) 73# define sv_fileno(sv) GEVAPI->sv_fileno (sv)
76# define sv_signum(sv) GEVAPI->sv_signum (sv) 74# define sv_signum(sv) GEVAPI->sv_signum (sv)
77# define ev_now(loop) GEVAPI->now (loop) 75# define ev_now(loop) GEVAPI->now (loop)
78# define ev_time(loop) GEVAPI->(time) (loop) 76# define ev_time() GEVAPI->(time) ()
79# define ev_backend(loop) GEVAPI->backend (loop) 77# define ev_backend(loop) GEVAPI->backend (loop)
80# define ev_loop(flags) GEVAPI->loop (flags) 78# define ev_loop(flags) GEVAPI->loop (flags)
81# define ev_unloop(how) GEVAPI->unloop (how) 79# define ev_unloop(how) GEVAPI->unloop (how)
82# define ev_once(fd,events,timeout,cb,arg) GEVAPI->once ((fd), (events), (timeout), (cb), (arg)) 80# define ev_once(fd,events,timeout,cb,arg) GEVAPI->once ((fd), (events), (timeout), (cb), (arg))
83# define ev_io_start(w) GEVAPI->io_start (w) 81# define ev_io_start(w) GEVAPI->io_start (w)
100# define ev_stat_start(w) GEVAPI->stat_start (w) 98# define ev_stat_start(w) GEVAPI->stat_start (w)
101# define ev_stat_stop(w) GEVAPI->stat_stop (w) 99# define ev_stat_stop(w) GEVAPI->stat_stop (w)
102# define ev_stat_stat(w) GEVAPI->stat_stat (w) 100# define ev_stat_stat(w) GEVAPI->stat_stat (w)
103# define ev_ref(loop) GEVAPI->ref (loop) 101# define ev_ref(loop) GEVAPI->ref (loop)
104# define ev_unref(loop) GEVAPI->unref (loop) 102# define ev_unref(loop) GEVAPI->unref (loop)
103# define ev_clear_pending(w,i) GEVAPI->clear_pending (w, i)
105#endif 104#endif
106 105
107static struct EVAPI *GEVAPI; 106static struct EVAPI *GEVAPI;
108 107
109#define I_EV_API(YourName) \ 108#define I_EV_API(YourName) \

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines