<commit_before>#include <string.h>
#include <stdio.h>
#include <stdlib.h>

#include "nasal.h"
#include "code.h"

void naFree(void* m) { free(m); }
void* naAlloc(int n) { return malloc(n); }
void* naRealloc(void* b, int n) { return realloc(b, n); }
void naBZero(void* m, int n) { memset(m, 0, n); }

void naTempSave(naContext c, naRef r)
{
    int i;
    if(!IS_OBJ(r)) return;
    if(c->ntemps >= c->tempsz) {
        c->tempsz *= 2;
        struct naObj** newtemps = naAlloc(c->tempsz * sizeof(struct naObj*));
        for(i=0; i<c->ntemps; i++)
            newtemps[i] = c->temps[i];
        naFree(c->temps);
        c->temps = newtemps;
    }
    c->temps[c->ntemps++] = r.ref.ptr.obj;
}

naRef naObj(int type, struct naObj* o)
{
    naRef r;<commit_msg>Oops, Frederic caught an inline declaration that had snuck into the code.<commit_after>#include <string.h>
#include <stdio.h>
#include <stdlib.h>

#include "nasal.h"
#include "code.h"

void naFree(void* m) { free(m); }
void* naAlloc(int n) { return malloc(n); }
void* naRealloc(void* b, int n) { return realloc(b, n); }
void naBZero(void* m, int n) { memset(m, 0, n); }

void naTempSave(naContext c, naRef r)
{
    int i;
    if(!IS_OBJ(r)) return;
    if(c->ntemps >= c->tempsz) {
        struct naObj** newtemps;
        c->tempsz *= 2;
        newtemps = naAlloc(c->tempsz * sizeof(struct naObj*));
        for(i=0; i<c->ntemps; i++)
            newtemps[i] = c->temps[i];
        naFree(c->temps);
        c->temps = newtemps;
    }
    c->temps[c->ntemps++] = r.ref.ptr.obj;
}

naRef naObj(int type, struct naObj* o)
{
    naRef r;
{'fraction_non_alphanumeric': 0.185069008782936, 'fraction_numerical': 0.0037641154328732747, 'mean_word_length': 2.9875, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 31, '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': '4399702', 'n_tokens_mistral': 672, 'n_tokens_neox': 664, 'n_words': 155}