From 946bac8f3c376979399cd4e33320ee46e85a5117 Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 21 May 2014 18:26:08 +0800 Subject: [PATCH] seems like pcre_free_study is not defined on older ubuntu --- src/node.c | 4 ++++ tests/bench_str.csv | 1 + 2 files changed, 5 insertions(+) diff --git a/src/node.c b/src/node.c index 8ec0aed..d7219fa 100644 --- a/src/node.c +++ b/src/node.c @@ -79,9 +79,11 @@ void r3_tree_free(node * tree) { if (tree->pcre_pattern) { pcre_free(tree->pcre_pattern); } + /* if (tree->pcre_extra) { pcre_free_study(tree->pcre_extra); } + */ if (tree->combined_pattern) zfree(tree->combined_pattern); if (tree->ov) @@ -208,9 +210,11 @@ void r3_tree_compile_patterns(node * n) { if (n->pcre_pattern) { pcre_free(n->pcre_pattern); } + /* if (n->pcre_extra) { pcre_free_study(n->pcre_extra); } + */ n->pcre_pattern = pcre_compile( n->combined_pattern, /* the pattern */ option_bits, /* default options */ diff --git a/tests/bench_str.csv b/tests/bench_str.csv index fd0f711..12a32f5 100644 --- a/tests/bench_str.csv +++ b/tests/bench_str.csv @@ -444,3 +444,4 @@ 1400666823,6406965.25 1400666950,6684744.95 1400667091,6771202.47 +1400667800,6695271.95