]> granicus.if.org Git - libevent/commitdiff
make event methods static so that they are not exported; from Andrei Nigmatulin
authorNiels Provos <provos@gmail.com>
Sat, 29 Mar 2008 01:45:45 +0000 (01:45 +0000)
committerNiels Provos <provos@gmail.com>
Sat, 29 Mar 2008 01:45:45 +0000 (01:45 +0000)
svn:r692

ChangeLog
devpoll.c
epoll.c
kqueue.c
poll.c
select.c

index 1c040ee75958dbdb03e9fd534cc01d593fc76a20..020e908207d1997fd82a99129871a1f688bb4c06 100644 (file)
--- 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.
index 930aa6a33d04e2efa13040a30c0d65d3e1f9f86f..705fb17c36aefefc2bb893d9de2d882be4c609eb 100644 (file)
--- 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 d89afe1bd7bab75adf5a878f23fc49c951d61560..52420f5538705bf289175ed428a716d1f646f10a 100644 (file)
--- 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;
index 2c27a7e6aa6f7470e070996f72c89302e642194c..e51df61c0963e4cf9e8ca3256aadf89abfab4501 100644 (file)
--- 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 2f8f6fce9e6cf747eb66bc7e3da65f08492ffb22..ef14c4fed76ce77620c5e394f27e65b29492f347 100644 (file)
--- 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;
index 064c396152a126bb97e39a489d99c6e067c93b4f..cf8e88aac8787507375a0cdb8a3ede680013168a 100644 (file)
--- 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;