summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Provos <provos@gmail.com>2008-03-29 01:45:45 +0000
committerNiels Provos <provos@gmail.com>2008-03-29 01:45:45 +0000
commitca42671a1443b695bc9a7640d4eb223d1a34fbcc (patch)
tree25b777596378c604af4f26bd92376c9069423f02
parentcb50f615d4902a0703a604bf64b1a5d014bcbb70 (diff)
downloadlibevent-ca42671a1443b695bc9a7640d4eb223d1a34fbcc.tar.gz
make event methods static so that they are not exported; from Andrei Nigmatulin
svn:r692
-rw-r--r--ChangeLog1
-rw-r--r--devpoll.c22
-rw-r--r--epoll.c20
-rw-r--r--kqueue.c24
-rw-r--r--poll.c20
-rw-r--r--select.c20
6 files changed, 54 insertions, 53 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c040ee7..020e9082 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,7 @@ Changes in current version:
o Provide OpenSSL style support for multiple threads accessing the same event_base
o make event_rpcgen.py generate code include event-config.h; reported by Sam Banks.
o switch thread support so that locks get allocated as they are needed.
+ o make event methods static so that they are not exported; from Andrei Nigmatulin
Changes in 1.4.0:
o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr.
diff --git a/devpoll.c b/devpoll.c
index 930aa6a3..705fb17c 100644
--- a/devpoll.c
+++ b/devpoll.c
@@ -69,11 +69,11 @@ struct devpollop {
int nchanges;
};
-void *devpoll_init (struct event_base *);
-int devpoll_add (void *, struct event *);
-int devpoll_del (void *, struct event *);
-int devpoll_dispatch (struct event_base *, void *, struct timeval *);
-void devpoll_dealloc (struct event_base *, void *);
+static void *devpoll_init (struct event_base *);
+static int devpoll_add (void *, struct event *);
+static int devpoll_del (void *, struct event *);
+static int devpoll_dispatch (struct event_base *, void *, struct timeval *);
+static void devpoll_dealloc (struct event_base *, void *);
struct eventop devpollops = {
"devpoll",
@@ -123,7 +123,7 @@ devpoll_queue(struct devpollop *devpollop, int fd, int events) {
return(0);
}
-void *
+static void *
devpoll_init(struct event_base *base)
{
int dpfd, nfiles = NEVENT;
@@ -182,7 +182,7 @@ devpoll_init(struct event_base *base)
return (devpollop);
}
-int
+static int
devpoll_recalc(struct event_base *base, void *arg, int max)
{
struct devpollop *devpollop = arg;
@@ -209,7 +209,7 @@ devpoll_recalc(struct event_base *base, void *arg, int max)
return (0);
}
-int
+static int
devpoll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
{
struct devpollop *devpollop = arg;
@@ -286,7 +286,7 @@ devpoll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
}
-int
+static int
devpoll_add(void *arg, struct event *ev)
{
struct devpollop *devpollop = arg;
@@ -340,7 +340,7 @@ devpoll_add(void *arg, struct event *ev)
return (0);
}
-int
+static int
devpoll_del(void *arg, struct event *ev)
{
struct devpollop *devpollop = arg;
@@ -397,7 +397,7 @@ devpoll_del(void *arg, struct event *ev)
return (0);
}
-void
+static void
devpoll_dealloc(struct event_base *base, void *arg)
{
struct devpollop *devpollop = arg;
diff --git a/epoll.c b/epoll.c
index d89afe1b..52420f55 100644
--- a/epoll.c
+++ b/epoll.c
@@ -69,11 +69,11 @@ struct epollop {
int epfd;
};
-void *epoll_init (struct event_base *);
-int epoll_add (void *, struct event *);
-int epoll_del (void *, struct event *);
-int epoll_dispatch (struct event_base *, void *, struct timeval *);
-void epoll_dealloc (struct event_base *, void *);
+static void *epoll_init (struct event_base *);
+static int epoll_add (void *, struct event *);
+static int epoll_del (void *, struct event *);
+static int epoll_dispatch (struct event_base *, void *, struct timeval *);
+static void epoll_dealloc (struct event_base *, void *);
struct eventop epollops = {
"epoll",
@@ -96,7 +96,7 @@ struct eventop epollops = {
#define NEVENT 32000
-void *
+static void *
epoll_init(struct event_base *base)
{
int epfd, nfiles = NEVENT;
@@ -179,7 +179,7 @@ epoll_recalc(struct event_base *base, void *arg, int max)
return (0);
}
-int
+static int
epoll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
{
struct epollop *epollop = arg;
@@ -238,7 +238,7 @@ epoll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
}
-int
+static int
epoll_add(void *arg, struct event *ev)
{
struct epollop *epollop = arg;
@@ -286,7 +286,7 @@ epoll_add(void *arg, struct event *ev)
return (0);
}
-int
+static int
epoll_del(void *arg, struct event *ev)
{
struct epollop *epollop = arg;
@@ -337,7 +337,7 @@ epoll_del(void *arg, struct event *ev)
return (0);
}
-void
+static void
epoll_dealloc(struct event_base *base, void *arg)
{
struct epollop *epollop = arg;
diff --git a/kqueue.c b/kqueue.c
index 2c27a7e6..e51df61c 100644
--- a/kqueue.c
+++ b/kqueue.c
@@ -75,12 +75,12 @@ struct kqop {
pid_t pid;
};
-void *kq_init (struct event_base *);
-int kq_add (void *, struct event *);
-int kq_del (void *, struct event *);
-int kq_dispatch (struct event_base *, void *, struct timeval *);
-int kq_insert (struct kqop *, struct kevent *);
-void kq_dealloc (struct event_base *, void *);
+static void *kq_init (struct event_base *);
+static int kq_add (void *, struct event *);
+static int kq_del (void *, struct event *);
+static int kq_dispatch (struct event_base *, void *, struct timeval *);
+static int kq_insert (struct kqop *, struct kevent *);
+static void kq_dealloc (struct event_base *, void *);
const struct eventop kqops = {
"kqueue",
@@ -92,7 +92,7 @@ const struct eventop kqops = {
1 /* need reinit */
};
-void *
+static void *
kq_init(struct event_base *base)
{
int kq;
@@ -155,7 +155,7 @@ kq_init(struct event_base *base)
return (kqueueop);
}
-int
+static int
kq_insert(struct kqop *kqop, struct kevent *kev)
{
int nevents = kqop->nevents;
@@ -206,7 +206,7 @@ kq_sighandler(int sig)
/* Do nothing here */
}
-int
+static int
kq_dispatch(struct event_base *base, void *arg, struct timeval *tv)
{
struct kqop *kqop = arg;
@@ -283,7 +283,7 @@ kq_dispatch(struct event_base *base, void *arg, struct timeval *tv)
}
-int
+static int
kq_add(void *arg, struct event *ev)
{
struct kqop *kqop = arg;
@@ -351,7 +351,7 @@ kq_add(void *arg, struct event *ev)
return (0);
}
-int
+static int
kq_del(void *arg, struct event *ev)
{
struct kqop *kqop = arg;
@@ -405,7 +405,7 @@ kq_del(void *arg, struct event *ev)
return (0);
}
-void
+static void
kq_dealloc(struct event_base *base, void *arg)
{
struct kqop *kqop = arg;
diff --git a/poll.c b/poll.c
index 2f8f6fce..ef14c4fe 100644
--- a/poll.c
+++ b/poll.c
@@ -65,11 +65,11 @@ struct pollop {
* "no entry." */
};
-void *poll_init (struct event_base *);
-int poll_add (void *, struct event *);
-int poll_del (void *, struct event *);
-int poll_dispatch (struct event_base *, void *, struct timeval *);
-void poll_dealloc (struct event_base *, void *);
+static void *poll_init (struct event_base *);
+static int poll_add (void *, struct event *);
+static int poll_del (void *, struct event *);
+static int poll_dispatch (struct event_base *, void *, struct timeval *);
+static void poll_dealloc (struct event_base *, void *);
const struct eventop pollops = {
"poll",
@@ -81,7 +81,7 @@ const struct eventop pollops = {
0
};
-void *
+static void *
poll_init(struct event_base *base)
{
struct pollop *pollop;
@@ -132,7 +132,7 @@ poll_check_ok(struct pollop *pop)
#define poll_check_ok(pop)
#endif
-int
+static int
poll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
{
int res, i, msec = -1, nfds;
@@ -196,7 +196,7 @@ poll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
return (0);
}
-int
+static int
poll_add(void *arg, struct event *ev)
{
struct pollop *pop = arg;
@@ -301,7 +301,7 @@ poll_add(void *arg, struct event *ev)
* Nothing to be done here.
*/
-int
+static int
poll_del(void *arg, struct event *ev)
{
struct pollop *pop = arg;
@@ -354,7 +354,7 @@ poll_del(void *arg, struct event *ev)
return (0);
}
-void
+static void
poll_dealloc(struct event_base *base, void *arg)
{
struct pollop *pop = arg;
diff --git a/select.c b/select.c
index 064c3961..cf8e88aa 100644
--- a/select.c
+++ b/select.c
@@ -70,11 +70,11 @@ struct selectop {
struct event **event_w_by_fd;
};
-void *select_init (struct event_base *);
-int select_add (void *, struct event *);
-int select_del (void *, struct event *);
-int select_dispatch (struct event_base *, void *, struct timeval *);
-void select_dealloc (struct event_base *, void *);
+static void *select_init (struct event_base *);
+static int select_add (void *, struct event *);
+static int select_del (void *, struct event *);
+static int select_dispatch (struct event_base *, void *, struct timeval *);
+static void select_dealloc (struct event_base *, void *);
const struct eventop selectops = {
"select",
@@ -88,7 +88,7 @@ const struct eventop selectops = {
static int select_resize(struct selectop *sop, int fdsz);
-void *
+static void *
select_init(struct event_base *base)
{
struct selectop *sop;
@@ -134,7 +134,7 @@ check_selectop(struct selectop *sop)
#define check_selectop(sop) do { (void) sop; } while (0)
#endif
-int
+static int
select_dispatch(struct event_base *base, void *arg, struct timeval *tv)
{
int res, i;
@@ -250,7 +250,7 @@ select_resize(struct selectop *sop, int fdsz)
}
-int
+static int
select_add(void *arg, struct event *ev)
{
struct selectop *sop = arg;
@@ -300,7 +300,7 @@ select_add(void *arg, struct event *ev)
* Nothing to be done here.
*/
-int
+static int
select_del(void *arg, struct event *ev)
{
struct selectop *sop = arg;
@@ -328,7 +328,7 @@ select_del(void *arg, struct event *ev)
return (0);
}
-void
+static void
select_dealloc(struct event_base *base, void *arg)
{
struct selectop *sop = arg;