From 00eaeeb936a070b01e8fbeab4722f6bc1873abdc Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sat, 19 Mar 2016 00:12:50 +0100 Subject: [PATCH] lib: fix API capn_new_string is exported as symbol but not in the header capn_write_mem_packed is internal but the symbol is visible --- lib/capn-malloc.c | 2 +- lib/capnp_c.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/capn-malloc.c b/lib/capn-malloc.c index 3d8093e..7a2977c 100644 --- a/lib/capn-malloc.c +++ b/lib/capn-malloc.c @@ -215,7 +215,7 @@ static int header_render(struct capn *c, struct capn_segment *seg, uint32_t *hea return 0; } -int capn_write_mem_packed(struct capn *c, uint8_t *p, size_t sz) +static int capn_write_mem_packed(struct capn *c, uint8_t *p, size_t sz) { struct capn_segment *seg; struct capn_ptr root; diff --git a/lib/capnp_c.h b/lib/capnp_c.h index 30d0b21..40d88f0 100644 --- a/lib/capnp_c.h +++ b/lib/capnp_c.h @@ -209,6 +209,7 @@ int capn_setv64(capn_list64 p, int off, const uint64_t *data, int sz); * datasz is in bytes, ptrs is # of pointers, sz is # of elements in the list * On an error a CAPN_NULL pointer is returned */ +capn_ptr capn_new_string(struct capn_segment *seg, const char *str, ssize_t sz); capn_ptr capn_new_struct(struct capn_segment *seg, int datasz, int ptrs); capn_ptr capn_new_interface(struct capn_segment *seg, int datasz, int ptrs); capn_ptr capn_new_ptr_list(struct capn_segment *seg, int sz);