summaryrefslogtreecommitdiff
path: root/lib/libevent
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-05-02 18:26:43 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-05-02 18:26:43 +0000
commitfa5a6d0b5277e1c9611065a2cefff7aec1abb4c2 (patch)
tree2716d2a0e5be82f19679da80cc5af7bf9eeaec84 /lib/libevent
parent82964eb088dd45b26fe2f7eaaae8722c2ae0f9cd (diff)
- Use a const pointer for bufferevent_write.
- Make event_init return struct event_base *. From the libevent SVN repo. ok millert@
Diffstat (limited to 'lib/libevent')
-rw-r--r--lib/libevent/evbuffer.c4
-rw-r--r--lib/libevent/event.34
-rw-r--r--lib/libevent/event.c4
-rw-r--r--lib/libevent/event.h7
4 files changed, 10 insertions, 9 deletions
diff --git a/lib/libevent/evbuffer.c b/lib/libevent/evbuffer.c
index 62e28320a49..25655cf548d 100644
--- a/lib/libevent/evbuffer.c
+++ b/lib/libevent/evbuffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: evbuffer.c,v 1.10 2007/03/19 15:12:49 millert Exp $ */
+/* $OpenBSD: evbuffer.c,v 1.11 2008/05/02 18:26:42 brad Exp $ */
/*
* Copyright (c) 2002-2004 Niels Provos <provos@citi.umich.edu>
@@ -290,7 +290,7 @@ bufferevent_free(struct bufferevent *bufev)
*/
int
-bufferevent_write(struct bufferevent *bufev, void *data, size_t size)
+bufferevent_write(struct bufferevent *bufev, const void *data, size_t size)
{
int res;
diff --git a/lib/libevent/event.3 b/lib/libevent/event.3
index 150c24ed4bd..45a555cfd67 100644
--- a/lib/libevent/event.3
+++ b/lib/libevent/event.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: event.3,v 1.38 2008/05/02 09:18:26 jmc Exp $
+.\" $OpenBSD: event.3,v 1.39 2008/05/02 18:26:42 brad Exp $
.\"
.\" Copyright (c) 2000 Artur Grabowski <art@openbsd.org>
.\" All rights reserved.
@@ -194,7 +194,7 @@
.Ft void
.Fn "bufferevent_free" "struct bufferevent *bufev"
.Ft int
-.Fn "bufferevent_write" "struct bufferevent *bufev" "void *data" "size_t size"
+.Fn "bufferevent_write" "struct bufferevent *bufev" "const void *data" "size_t size"
.Ft int
.Fn "bufferevent_write_buffer" "struct bufferevent *bufev" "struct evbuffer *buf"
.Ft size_t
diff --git a/lib/libevent/event.c b/lib/libevent/event.c
index a460467e330..928cbf7145e 100644
--- a/lib/libevent/event.c
+++ b/lib/libevent/event.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: event.c,v 1.18 2008/05/02 06:09:11 brad Exp $ */
+/* $OpenBSD: event.c,v 1.19 2008/05/02 18:26:42 brad Exp $ */
/*
* Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu>
@@ -182,7 +182,7 @@ RB_PROTOTYPE(event_tree, event, ev_timeout_node, compare);
RB_GENERATE(event_tree, event, ev_timeout_node, compare);
-void *
+struct event_base *
event_init(void)
{
int i;
diff --git a/lib/libevent/event.h b/lib/libevent/event.h
index 82451393895..24125d40b98 100644
--- a/lib/libevent/event.h
+++ b/lib/libevent/event.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: event.h,v 1.19 2008/05/02 06:09:11 brad Exp $ */
+/* $OpenBSD: event.h,v 1.20 2008/05/02 18:26:42 brad Exp $ */
/*
* Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu>
@@ -145,7 +145,7 @@ struct eventop {
void (*dealloc)(struct event_base *, void *);
};
-void *event_init(void);
+struct event_base *event_init(void);
int event_dispatch(void);
int event_base_dispatch(struct event_base *);
void event_base_free(struct event_base *);
@@ -262,7 +262,8 @@ struct bufferevent *bufferevent_new(int fd,
int bufferevent_base_set(struct event_base *base, struct bufferevent *bufev);
int bufferevent_priority_set(struct bufferevent *bufev, int pri);
void bufferevent_free(struct bufferevent *bufev);
-int bufferevent_write(struct bufferevent *bufev, void *data, size_t size);
+int bufferevent_write(struct bufferevent *bufev,
+ const void *data, size_t size);
int bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer *buf);
size_t bufferevent_read(struct bufferevent *bufev, void *data, size_t size);
int bufferevent_enable(struct bufferevent *bufev, short event);