kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit acc34e2d51beda13e5bc4c5047b54cbedd5b5ac0
parent a8052c7ac40a7be26a570d5db4a7ee7928cfebd6
Author: Joris Vink <joris@coders.se>
Date:   Thu, 22 Aug 2013 10:06:39 +0200

Change kore_buf_append() and kore_buf_replace_string() to take a void pointer.

Diffstat:
includes/kore.h | 4++--
src/buf.c | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/includes/kore.h b/includes/kore.h @@ -343,13 +343,13 @@ void net_send_queue(struct connection *, u_int8_t *, size_t, int, void kore_buf_free(struct kore_buf *); struct kore_buf *kore_buf_create(u_int32_t); -void kore_buf_append(struct kore_buf *, u_int8_t *, u_int32_t); +void kore_buf_append(struct kore_buf *, void *, u_int32_t); u_int8_t *kore_buf_release(struct kore_buf *, u_int32_t *); void kore_buf_appendf(struct kore_buf *, const char *, ...); void kore_buf_appendv(struct kore_buf *, struct buf_vec *, u_int16_t); void kore_buf_appendb(struct kore_buf *, struct kore_buf *); void kore_buf_replace_string(struct kore_buf *, const char *, - u_int8_t *, size_t); + void *, size_t); struct spdy_header_block *spdy_header_block_create(int); struct spdy_stream *spdy_stream_lookup(struct connection *, u_int32_t); diff --git a/src/buf.c b/src/buf.c @@ -30,7 +30,7 @@ kore_buf_create(u_int32_t initial) } void -kore_buf_append(struct kore_buf *buf, u_int8_t *d, u_int32_t len) +kore_buf_append(struct kore_buf *buf, void *d, u_int32_t len) { if ((buf->offset + len) >= buf->length) { buf->length += len + KORE_BUF_INCREMENT; @@ -99,7 +99,7 @@ kore_buf_free(struct kore_buf *buf) void kore_buf_replace_string(struct kore_buf *b, const char *src, - u_int8_t *dst, size_t len) + void *dst, size_t len) { u_int32_t blen, off, off2; size_t nlen, klen;