Commit ce60acf7 authored by Matthieu Dorier's avatar Matthieu Dorier

moved omap-iter functions into client

parent 48a714ab
noinst_HEADERS += \ noinst_HEADERS += \
src/client/aio/completion.h \ src/client/aio/completion.h \
src/client/io-context.h \
src/client/cluster-handle.h \ src/client/cluster-handle.h \
src/client/io-context.h \
src/io-chain/args-read-actions.h \ src/io-chain/args-read-actions.h \
src/io-chain/args-write-actions.h \ src/io-chain/args-write-actions.h \
src/io-chain/prepare-read-op.h \ src/io-chain/prepare-read-op.h \
...@@ -48,6 +48,7 @@ src_io_chain_libio_chain_la_SOURCES = src/io-chain/prepare-read-op.c \ ...@@ -48,6 +48,7 @@ src_io_chain_libio_chain_la_SOURCES = src/io-chain/prepare-read-op.c \
src_client_libmobject_store_la_SOURCES = \ src_client_libmobject_store_la_SOURCES = \
src/client/aio/completion.c \ src/client/aio/completion.c \
src/client/io-context.c \ src/client/io-context.c \
src/client/omap-iter.c \
src/client/read-op.c \ src/client/read-op.c \
src/client/write-op.c \ src/client/write-op.c \
src/client/libmobject-store.c src/client/libmobject-store.c
......
/*
* (C) 2017 The University of Chicago
*
* See COPYRIGHT in top-level directory.
*/
#include <stdlib.h>
#include "libmobject-store.h"
#include "src/omap-iter/omap-iter-impl.h"
int mobject_store_omap_get_next(mobject_store_omap_iter_t iter,
char **key,
char **val,
size_t *len)
{
if(iter->current == NULL) return -1;
*key = iter->current->key;
*val = iter->current->value;
*len = iter->current->value_size;
iter->current = iter->current->next;
return 0;
}
void mobject_store_omap_get_end(mobject_store_omap_iter_t iter)
{
omap_iter_free(iter);
}
...@@ -60,24 +60,3 @@ void omap_iter_append(mobject_store_omap_iter_t iter, ...@@ -60,24 +60,3 @@ void omap_iter_append(mobject_store_omap_iter_t iter,
iter->num_items += 1; iter->num_items += 1;
} }
int mobject_store_omap_get_next(mobject_store_omap_iter_t iter,
char **key,
char **val,
size_t *len)
{
if(iter->current == NULL) return -1;
*key = iter->current->key;
*val = iter->current->value;
*len = iter->current->value_size;
iter->current = iter->current->next;
return 0;
}
void mobject_store_omap_get_end(mobject_store_omap_iter_t iter)
{
omap_iter_free(iter);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment