git/reftable/record.c

/*
Copyright 2020 Google LLC

Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
https://developers.google.com/open-source/licenses/bsd
*/

/* record.c - methods for different types of records. */

#include "record.h"

#include "system.h"
#include "constants.h"
#include "reftable-error.h"
#include "basics.h"

static struct reftable_record_vtable *
reftable_record_vtable(struct reftable_record *rec);
static void *reftable_record_data(struct reftable_record *rec);

int get_var_int(uint64_t *dest, struct string_view *in)
{}

int put_var_int(struct string_view *dest, uint64_t val)
{}

int reftable_is_block_type(uint8_t typ)
{}

const unsigned char *reftable_ref_record_val1(const struct reftable_ref_record *rec)
{}

const unsigned char *reftable_ref_record_val2(const struct reftable_ref_record *rec)
{}

static int decode_string(struct strbuf *dest, struct string_view in)
{}

static int encode_string(const char *str, struct string_view s)
{}

int reftable_encode_key(int *restart, struct string_view dest,
			struct strbuf prev_key, struct strbuf key,
			uint8_t extra)
{}

int reftable_decode_keylen(struct string_view in,
			   uint64_t *prefix_len,
			   uint64_t *suffix_len,
			   uint8_t *extra)
{}

int reftable_decode_key(struct strbuf *last_key, uint8_t *extra,
			struct string_view in)
{}

static void reftable_ref_record_key(const void *r, struct strbuf *dest)
{}

static int reftable_ref_record_copy_from(void *rec, const void *src_rec,
					 int hash_size)
{}

static void reftable_ref_record_release_void(void *rec)
{}

void reftable_ref_record_release(struct reftable_ref_record *ref)
{}

static uint8_t reftable_ref_record_val_type(const void *rec)
{}

static int reftable_ref_record_encode(const void *rec, struct string_view s,
				      int hash_size)
{}

static int reftable_ref_record_decode(void *rec, struct strbuf key,
				      uint8_t val_type, struct string_view in,
				      int hash_size, struct strbuf *scratch)
{}

static int reftable_ref_record_is_deletion_void(const void *p)
{}

static int reftable_ref_record_equal_void(const void *a,
					  const void *b, int hash_size)
{}

static int reftable_ref_record_cmp_void(const void *_a, const void *_b)
{}

static struct reftable_record_vtable reftable_ref_record_vtable =;

static void reftable_obj_record_key(const void *r, struct strbuf *dest)
{}

static void reftable_obj_record_release(void *rec)
{}

static int reftable_obj_record_copy_from(void *rec, const void *src_rec,
					 int hash_size UNUSED)
{}

static uint8_t reftable_obj_record_val_type(const void *rec)
{}

static int reftable_obj_record_encode(const void *rec, struct string_view s,
				      int hash_size UNUSED)
{}

static int reftable_obj_record_decode(void *rec, struct strbuf key,
				      uint8_t val_type, struct string_view in,
				      int hash_size UNUSED,
				      struct strbuf *scratch UNUSED)
{}

static int not_a_deletion(const void *p UNUSED)
{}

static int reftable_obj_record_equal_void(const void *a, const void *b,
					  int hash_size UNUSED)
{}

static int reftable_obj_record_cmp_void(const void *_a, const void *_b)
{}

static struct reftable_record_vtable reftable_obj_record_vtable =;

static void reftable_log_record_key(const void *r, struct strbuf *dest)
{}

static int reftable_log_record_copy_from(void *rec, const void *src_rec,
					 int hash_size)
{}

static void reftable_log_record_release_void(void *rec)
{}

void reftable_log_record_release(struct reftable_log_record *r)
{}

static uint8_t reftable_log_record_val_type(const void *rec)
{}

static int reftable_log_record_encode(const void *rec, struct string_view s,
				      int hash_size)
{}

static int reftable_log_record_decode(void *rec, struct strbuf key,
				      uint8_t val_type, struct string_view in,
				      int hash_size, struct strbuf *scratch)
{}

static int null_streq(const char *a, const char *b)
{}

static int reftable_log_record_equal_void(const void *a,
					  const void *b, int hash_size)
{}

static int reftable_log_record_cmp_void(const void *_a, const void *_b)
{}

int reftable_log_record_equal(const struct reftable_log_record *a,
			      const struct reftable_log_record *b, int hash_size)
{}

static int reftable_log_record_is_deletion_void(const void *p)
{}

static struct reftable_record_vtable reftable_log_record_vtable =;

static void reftable_index_record_key(const void *r, struct strbuf *dest)
{}

static int reftable_index_record_copy_from(void *rec, const void *src_rec,
					   int hash_size UNUSED)
{}

static void reftable_index_record_release(void *rec)
{}

static uint8_t reftable_index_record_val_type(const void *rec UNUSED)
{}

static int reftable_index_record_encode(const void *rec, struct string_view out,
					int hash_size UNUSED)
{}

static int reftable_index_record_decode(void *rec, struct strbuf key,
					uint8_t val_type UNUSED,
					struct string_view in,
					int hash_size UNUSED,
					struct strbuf *scratch UNUSED)
{}

static int reftable_index_record_equal(const void *a, const void *b,
				       int hash_size UNUSED)
{}

static int reftable_index_record_cmp(const void *_a, const void *_b)
{}

static struct reftable_record_vtable reftable_index_record_vtable =;

void reftable_record_key(struct reftable_record *rec, struct strbuf *dest)
{}

int reftable_record_encode(struct reftable_record *rec, struct string_view dest,
			   int hash_size)
{}

int reftable_record_copy_from(struct reftable_record *rec,
			       struct reftable_record *src, int hash_size)
{}

uint8_t reftable_record_val_type(struct reftable_record *rec)
{}

int reftable_record_decode(struct reftable_record *rec, struct strbuf key,
			   uint8_t extra, struct string_view src, int hash_size,
			   struct strbuf *scratch)
{}

void reftable_record_release(struct reftable_record *rec)
{}

int reftable_record_is_deletion(struct reftable_record *rec)
{}

int reftable_record_cmp(struct reftable_record *a, struct reftable_record *b)
{}

int reftable_record_equal(struct reftable_record *a, struct reftable_record *b, int hash_size)
{}

static int hash_equal(const unsigned char *a, const unsigned char *b, int hash_size)
{}

int reftable_ref_record_equal(const struct reftable_ref_record *a,
			      const struct reftable_ref_record *b, int hash_size)
{}

int reftable_ref_record_compare_name(const void *a, const void *b)
{}

int reftable_ref_record_is_deletion(const struct reftable_ref_record *ref)
{}

int reftable_log_record_compare_key(const void *a, const void *b)
{}

int reftable_log_record_is_deletion(const struct reftable_log_record *log)
{}

static void *reftable_record_data(struct reftable_record *rec)
{}

static struct reftable_record_vtable *
reftable_record_vtable(struct reftable_record *rec)
{}

void reftable_record_init(struct reftable_record *rec, uint8_t typ)
{}