<commit_before>/* $Id$ */

#include <stdio.h>

#include "psc_ds/tree.h"

#include "rpc.h"
#include "slashrpc.h"

void
slashrpc_export_destroy(void *data)
{
	struct slashrpc_export *sexp = data;
	struct cfdent *t;

	SPLAY_FOREACH(t, cfdtree, &sexp->cfdtree)
		free(t);
	free(sexp);
}<commit_msg>better slashrpc_export_destroy<commit_after>/* $Id$ */

#include <stdio.h>

#include "psc_ds/tree.h"

#include "rpc.h"
#include "slashrpc.h"

void
slashrpc_export_destroy(void *data)
{
	struct slashrpc_export *sexp = data;
	struct cfdent *c, *next;

	for (c = SPLAY_MIN(cfdtree, &sexp->cfdtree); c; c = next) {
		next = SPLAY_NEXT(cfdtree, &sexp->cfdtree, c);
		SPLAY_REMOVE(cfdtree, &sexp->cfdtree, c);
		free(c);
	}
	free(sexp);
}
{'fraction_non_alphanumeric': 0.17079889807162535, 'fraction_numerical': 0.0, 'mean_word_length': 5.058333333333334, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '4276018', 'n_tokens_mistral': 338, 'n_tokens_neox': 324, 'n_words': 63}