<commit_before>/*
 *   rpatricia.c - Ruby wrapper of Net::Patricia
 *   <NAME> <<EMAIL>>
 */

#include "ruby.h"
#include <stdlib.h>
#include "patricia.h"
#include <assert.h>

static VALUE cPatricia, cNode;
static VALUE sym_AF_INET, sym_AF_INET6;

static void dummy(void) {}

static VALUE
p_destroy (VALUE self)
{
  patricia_tree_t *tree;

  Data_Get_Struct(self, patricia_tree_t, tree);
  Clear_Patricia(tree, dummy);
  tree->head = NULL; /* Clear_Patricia() should do this, actually */

  return Qtrue;<commit_msg>rpatricia: add missing prototypes for functions<commit_after>/*
 *   rpatricia.c - Ruby wrapper of Net::Patricia
 *   <NAME> <<EMAIL>>
 */

#include "ruby.h"
#include <stdlib.h>
#include "patricia.h"
#include <assert.h>

size_t patricia_walk_inorder(patricia_node_t *node, void_fn_t func);
char * prefix_toa2x(prefix_t *prefix, char *buff, int with_len);
char * prefix_toa2(prefix_t *prefix, char *buff);

static VALUE cPatricia, cNode;
static VALUE sym_AF_INET, sym_AF_INET6;

static void dummy(void) {}

static VALUE
p_destroy (VALUE self)
{
  patricia_tree_t *tree;

  Data_Get_Struct(self, patricia_tree_t, tree);
  Clear_Patricia(tree, dummy);
  tree->head = NULL; /* Clear_Patricia() should do this, actually */

  return Qtrue;
{'fraction_non_alphanumeric': 0.12730184147317855, 'fraction_numerical': 0.0032025620496397116, 'mean_word_length': 5.067961165048544, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '3711171', 'n_tokens_mistral': 497, 'n_tokens_neox': 467, 'n_words': 117}