<commit_before>#ifndef __rs_HASHTABLE__
#define __rs_HASHTABLE__

#include <stdlib.h>

/**
 * @brief hashtable type. We don't show our implementation
 */
struct rs_ht;

typedef uint64_t (*rs_ht_hashfunc)(void *, size_t);

// if on 64bit
typedef uint64_t rs_ht_bucket_id;
// else
// typedef uint32_t rs_ht_bucket_id;
// else
// typedef uint16_t rs_ht_bucket_id;
// else
// typedef uint8_t rs_ht_bucket_id;

/*
 * creation and destroying
 */

struct rs_ht *      rs_ht_new        ();
void                rs_ht_init       (struct rs_ht *ht,
                                     rs_ht_bucket_id size);
struct rs_ht *      rs_ht_destroy    (struct rs_ht *ht);

/*
 * configuration
 */

void rs_ht_set_hasherfunc   (struct rs_ht *ht, rs_ht_hashfunc f);

/*
 * usage
 */

rs_ht_bucket_id     rs_ht_put    (struct rs_ht *ht, void *d, size_t ds);
void *              rs_ht_get    (struct rs_ht *ht, rs_ht_bucket_id);
void *              rs_ht_del    (struct rs_ht *ht, rs_ht_bucket_id);

/*
 * metainformations<commit_msg>Argument parentheses should always be filled<commit_after>#ifndef __rs_HASHTABLE__
#define __rs_HASHTABLE__

#include <stdlib.h>

/**
 * @brief hashtable type. We don't show our implementation
 */
struct rs_ht;

typedef uint64_t (*rs_ht_hashfunc)(void *, size_t);

// if on 64bit
typedef uint64_t rs_ht_bucket_id;
// else
// typedef uint32_t rs_ht_bucket_id;
// else
// typedef uint16_t rs_ht_bucket_id;
// else
// typedef uint8_t rs_ht_bucket_id;

/*
 * creation and destroying
 */

struct rs_ht *      rs_ht_new        (void);
void                rs_ht_init       (struct rs_ht *ht,
                                     rs_ht_bucket_id size);
struct rs_ht *      rs_ht_destroy    (struct rs_ht *ht);

/*
 * configuration
 */

void rs_ht_set_hasherfunc   (struct rs_ht *ht, rs_ht_hashfunc f);

/*
 * usage
 */

rs_ht_bucket_id     rs_ht_put    (struct rs_ht *ht, void *d, size_t ds);
void *              rs_ht_get    (struct rs_ht *ht, rs_ht_bucket_id);
void *              rs_ht_del    (struct rs_ht *ht, rs_ht_bucket_id);

/*
 * metainformations
{'fraction_non_alphanumeric': 0.09801067442988841, 'fraction_numerical': 0.010674429888403688, 'mean_word_length': 2.6690391459074734, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3703213', 'n_tokens_mistral': 782, 'n_tokens_neox': 747, 'n_words': 181}