diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-07-03 11:10:09 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-07-03 11:10:09 +0000 |
commit | 0beff2477b55728603127f21a9df604b6fcf840c (patch) | |
tree | 2d13673355974d9c74dc46b2dd84231c5b744f2e /src/include | |
parent | 109417b5defcd6d13c54b213c4f06272fcf0dc19 (diff) | |
download | skalibs-0beff2477b55728603127f21a9df604b6fcf840c.tar.xz |
Refactor cdbmake, add cdbmake_addv, cdb_hashv
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/skalibs/cdbmake.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/include/skalibs/cdbmake.h b/src/include/skalibs/cdbmake.h index 0da0a86..18b798a 100644 --- a/src/include/skalibs/cdbmake.h +++ b/src/include/skalibs/cdbmake.h @@ -4,9 +4,8 @@ #define SKALIBS_CDBMAKE_H #include <stdint.h> +#include <sys/uio.h> -#include <skalibs/diuint32.h> -#include <skalibs/allreadwrite.h> #include <skalibs/genalloc.h> #include <skalibs/buffer.h> @@ -18,11 +17,11 @@ struct cdbmaker_s buffer b ; char buf[BUFFER_OUTSIZE] ; } ; - -#define CDBMAKER_ZERO { .hplist = GENALLOC_ZERO, .pos = 2048, .b = BUFFER_INIT(&fd_writev, -1, 0, 0) } +#define CDBMAKER_ZERO { .hplist = GENALLOC_ZERO, .pos = 2048, .b = BUFFER_ZERO, .buf = { 0 } } extern int cdbmake_start (cdbmaker *, int) ; extern int cdbmake_add (cdbmaker *, char const *, uint32_t, char const *, uint32_t) ; +extern int cdbmake_addv (cdbmaker *, struct iovec const *, unsigned int, struct iovec const *, unsigned int) ; extern int cdbmake_finish (cdbmaker *) ; #endif |