#define REFTABLE_ALLOW_BANNED_ALLOCATORS
#include "basics.h"
#include "reftable-basics.h"
#include "reftable-error.h"
static void *(*reftable_malloc_ptr)(size_t sz);
static void *(*reftable_realloc_ptr)(void *, size_t);
static void (*reftable_free_ptr)(void *);
void *reftable_malloc(size_t sz)
{ … }
void *reftable_realloc(void *p, size_t sz)
{ … }
void reftable_free(void *p)
{ … }
void *reftable_calloc(size_t nelem, size_t elsize)
{ … }
char *reftable_strdup(const char *str)
{ … }
void reftable_set_alloc(void *(*malloc)(size_t),
void *(*realloc)(void *, size_t), void (*free)(void *))
{ … }
void reftable_buf_init(struct reftable_buf *buf)
{ … }
void reftable_buf_release(struct reftable_buf *buf)
{ … }
void reftable_buf_reset(struct reftable_buf *buf)
{ … }
int reftable_buf_setlen(struct reftable_buf *buf, size_t len)
{ … }
int reftable_buf_cmp(const struct reftable_buf *a, const struct reftable_buf *b)
{ … }
int reftable_buf_add(struct reftable_buf *buf, const void *data, size_t len)
{ … }
int reftable_buf_addstr(struct reftable_buf *buf, const char *s)
{ … }
char *reftable_buf_detach(struct reftable_buf *buf)
{ … }
void put_be24(uint8_t *out, uint32_t i)
{ … }
uint32_t get_be24(uint8_t *in)
{ … }
void put_be16(uint8_t *out, uint16_t i)
{ … }
size_t binsearch(size_t sz, int (*f)(size_t k, void *args), void *args)
{ … }
void free_names(char **a)
{ … }
size_t names_length(const char **names)
{ … }
char **parse_names(char *buf, int size)
{ … }
int names_equal(const char **a, const char **b)
{ … }
int common_prefix_size(struct reftable_buf *a, struct reftable_buf *b)
{ … }
int hash_size(uint32_t id)
{ … }