use a const pointer for bufferevent_write

svn:r531
This commit is contained in:
Niels Provos 2007-11-17 01:32:30 +00:00
parent f586f42885
commit af6f331a0b
3 changed files with 6 additions and 3 deletions

View File

@ -2,6 +2,7 @@ Changes in current version:
o free minheap on event_base_free(); from Christopher Layne o free minheap on event_base_free(); from Christopher Layne
o debug cleanups in signal.c; from Christopher Layne o debug cleanups in signal.c; from Christopher Layne
o provide event_base_new() that does not set the current_base global o provide event_base_new() that does not set the current_base global
o bufferevent_write now uses a const source argument; report from Charles Kerr
Changes in 1.4.0: Changes in 1.4.0:
o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr. o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr.

View File

@ -293,7 +293,7 @@ bufferevent_free(struct bufferevent *bufev)
*/ */
int int
bufferevent_write(struct bufferevent *bufev, void *data, size_t size) bufferevent_write(struct bufferevent *bufev, const void *data, size_t size)
{ {
int res; int res;

View File

@ -796,11 +796,13 @@ void bufferevent_free(struct bufferevent *bufev);
@return 0 if successful, or -1 if an error occurred @return 0 if successful, or -1 if an error occurred
@see bufferevent_write_buffer() @see bufferevent_write_buffer()
*/ */
int bufferevent_write(struct bufferevent *bufev, void *data, size_t size); int bufferevent_write(struct bufferevent *bufev,
const void *data, size_t size);
/** /**
Write data from an evbuffer to a bufferevent buffer. Write data from an evbuffer to a bufferevent buffer. The evbuffer is
being drained as a result.
@param bufev the bufferevent to be written to @param bufev the bufferevent to be written to
@param buf the evbuffer to be written @param buf the evbuffer to be written