<commit_before>#include <strings.h>
#include "modern.h"
#include "internal.h"


modern_context *modern_make_initial_context
  (modern_library *library_in)
{
    struct modern_library *library = (struct modern_library *) library_in;
    
    struct modern_context *context =
        library->allocator->alloc
            (library->client_state, sizeof(struct modern_context));
    context->memory.finalizer = internal_context_finalizer;
    context->n_values = 0;
    context->n_buckets = 1024;
    size_t hash_size = sizeof(struct modern *) * context->n_buckets;
    context->hash = library->allocator->alloc
        (library->client_state, hash_size);
    bzero(context->hash, hash_size);
    
    return (modern_context *) context;
}


INTERNAL void internal_context_finalizer
  (struct modern_library *library,
   void *context_in)
{
	struct modern_context *context = (struct modern_context *) context_in;
    library->allocator->free
        (library->client_state, context->hash);
    library->allocator->free
        (library->client_state, context);
}


modern_context *modern_copy_context
  (modern_library *library,
   modern_context *context)
{
    // TODO
    return NULL;
}


int modern_get_in_context
  (modern_library *library,
   modern_context *context, modern *node)
{
    // TODO
    return 0;
}


void modern_add_to_context
  (modern_library *library,
   modern_context *context, modern *node)
{
    // TODO
}


modern *modern_get_from_context
  (modern_library *library,
   modern_context *context, struct modern_hash hash)
{
    // TODO
    return NULL;
}
<commit_msg>Actually rename the implementation of modern_context_copy(), per earlier commit renaming the declaration.<commit_after>#include <strings.h>
#include "modern.h"
#include "internal.h"


modern_context *modern_initial_context_make
  (modern_library *library_in)
{
    struct modern_library *library = (struct modern_library *) library_in;
    
    struct modern_context *context =
        library->allocator->alloc
            (library->client_state, sizeof(struct modern_context));
    context->memory.finalizer = internal_context_finalizer;
    context->n_values = 0;
    context->n_buckets = 1024;
    size_t hash_size = sizeof(struct modern *) * context->n_buckets;
    context->hash = library->allocator->alloc
        (library->client_state, hash_size);
    bzero(context->hash, hash_size);
    
    return (modern_context *) context;
}


INTERNAL void internal_context_finalizer
  (struct modern_library *library,
   void *context_in)
{
	struct modern_context *context = (struct modern_context *) context_in;
    library->allocator->free
        (library->client_state, context->hash);
    library->allocator->free
        (library->client_state, context);
}


modern_context *modern_context_copy
  (modern_library *library,
   modern_context *context)
{
    // TODO
    return NULL;
}


int modern_get_in_context
  (modern_library *library,
   modern_context *context, modern *node)
{
    // TODO
    return 0;
}


void modern_add_to_context
  (modern_library *library,
   modern_context *context, modern *node)
{
    // TODO
}


modern *modern_get_from_context
  (modern_library *library,
   modern_context *context, struct modern_hash hash)
{
    // TODO
    return NULL;
}

{'fraction_non_alphanumeric': 0.10275229357798166, 'fraction_numerical': 0.003669724770642202, 'mean_word_length': 3.860326894502229, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '702466', 'n_tokens_mistral': 1046, 'n_tokens_neox': 989, 'n_words': 219}