<commit_before>
// as goofy as it sounds, memory-related routines are actually in string.h
// yay C. (Also, Google Native Client doesn't have memory.h)
include string

version(!gc) {
    // GC_MALLOC zeroes the memory, so in the non-gc version, we prefer to use calloc
    // to the expense of some performance. If you want to use malloc instead - do so
    // at your own risks. Some sdk classes may not zero their every field.

    //gc_malloc: extern(malloc) func (size: SizeT) -> Pointer
    gc_malloc: func (size: SizeT) -> Pointer {
        gc_calloc(1, size)
    }
    gc_malloc_atomic: extern(malloc) func (size: SizeT) -> Pointer
    gc_strdup: extern(strdup) func (str: CString) -> CString
    gc_realloc: extern(realloc) func (ptr: Pointer, size: SizeT) -> Pointer
    gc_calloc: extern(calloc) func (nmemb: SizeT, size: SizeT) -> Pointer
    gc_free: extern(free) func (ptr: Pointer)
}

version(gc) {
    include gc/gc | (GC_THREADS)

    gc_malloc: extern(GC_malloc) func (size: SizeT) -> Pointer
    gc_malloc_atomic: extern(GC_malloc_atomic) func (size: SizeT) -> Pointer
    gc_strdup: extern(GC_strdup) func (str: CString) -> CString
    gc_realloc: extern(GC_realloc) func (ptr: Pointer, size: SizeT) -> Pointer
    gc_calloc: func (nmemb: SizeT, size: SizeT) -> Pointer {
        gc_malloc(nmemb * size)
    }
    gc_free: extern(GC_free) func (ptr: Pointer)

    GC_add_roots: extern func (Pointer, Pointer)
    GC_remove_roots: extern func (Pointer, Pointer)
    GC_stackbottom: extern Pointer<commit_msg>Correct define values for gc.h to get gc pthreads prototypes<commit_after>
// as goofy as it sounds, memory-related routines are actually in string.h
// yay C. (Also, Google Native Client doesn't have memory.h)
include string

version(!gc) {
    // GC_MALLOC zeroes the memory, so in the non-gc version, we prefer to use calloc
    // to the expense of some performance. If you want to use malloc instead - do so
    // at your own risks. Some sdk classes may not zero their every field.

    //gc_malloc: extern(malloc) func (size: SizeT) -> Pointer
    gc_malloc: func (size: SizeT) -> Pointer {
        gc_calloc(1, size)
    }
    gc_malloc_atomic: extern(malloc) func (size: SizeT) -> Pointer
    gc_strdup: extern(strdup) func (str: CString) -> CString
    gc_realloc: extern(realloc) func (ptr: Pointer, size: SizeT) -> Pointer
    gc_calloc: extern(calloc) func (nmemb: SizeT, size: SizeT) -> Pointer
    gc_free: extern(free) func (ptr: Pointer)
}

version(gc) {
    include gc/gc | (GC_THREADS, GC_PTHREADS, GC_NO_THREADS_REDIRECT)

    gc_malloc: extern(GC_malloc) func (size: SizeT) -> Pointer
    gc_malloc_atomic: extern(GC_malloc_atomic) func (size: SizeT) -> Pointer
    gc_strdup: extern(GC_strdup) func (str: CString) -> CString
    gc_realloc: extern(GC_realloc) func (ptr: Pointer, size: SizeT) -> Pointer
    gc_calloc: func (nmemb: SizeT, size: SizeT) -> Pointer {
        gc_malloc(nmemb * size)
    }
    gc_free: extern(GC_free) func (ptr: Pointer)

    GC_add_roots: extern func (Pointer, Pointer)
    GC_remove_roots: extern func (Pointer, Pointer)
    GC_stackbottom: extern Pointer
{'fraction_non_alphanumeric': 0.10682397959183673, 'fraction_numerical': 0.0006377551020408163, 'mean_word_length': 3.5795620437956206, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, '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': '1635900', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1032, 'n_words': 348}