summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--regcomp.c24
2 files changed, 13 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 883216c..59832b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed May 25 13:13:37 2016 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * regcomp.c: remove condition for debug output because prelude
+ doesn't use regexp now.
+
Wed May 25 13:10:30 2016 NARUSE, Yui <naruse@ruby-lang.org>
* regcomp.c (compile_length_tree): return error code immediately
diff --git a/regcomp.c b/regcomp.c
index 34b37f8..07e5186 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -135,12 +135,6 @@ bitset_is_empty(BitSetRef bs)
#ifdef ONIG_DEBUG
static int
-onig_is_prelude(void)
-{
- return !rb_const_defined(rb_cThread, rb_intern_const("MUTEX_FOR_THREAD_EXCLUSIVE"));
-}
-
-static int
bitset_on_num(BitSetRef bs)
{
int i, n;
@@ -5270,7 +5264,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
default:
#ifdef ONIG_DEBUG
- if (!onig_is_prelude()) fprintf(stderr, "optimize_node_left: undefined node type %d\n",
+ fprintf(stderr, "optimize_node_left: undefined node type %d\n",
NTYPE(node));
#endif
r = ONIGERR_TYPE_BUG;
@@ -5416,7 +5410,7 @@ set_optimize_info_from_tree(Node* node, regex_t* reg, ScanEnv* scan_env)
}
#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH)
- if (!onig_is_prelude()) print_optimize_info(stderr, reg);
+ print_optimize_info(stderr, reg);
#endif
return r;
}
@@ -5717,7 +5711,7 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
reg->state = ONIG_STATE_COMPILING;
#ifdef ONIG_DEBUG
- if (!onig_is_prelude()) print_enc_string(stderr, reg->enc, pattern, pattern_end);
+ print_enc_string(stderr, reg->enc, pattern, pattern_end);
#endif
if (reg->alloc == 0) {
@@ -5744,9 +5738,7 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
#ifdef ONIG_DEBUG_PARSE_TREE
# if 0
fprintf(stderr, "ORIGINAL PARSE TREE:\n");
- if (!onig_is_prelude()) {
- print_tree(stderr, root);
- }
+ print_tree(stderr, root);
# endif
#endif
@@ -5786,7 +5778,7 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
if (r != 0) goto err_unset;
#ifdef ONIG_DEBUG_PARSE_TREE
- if (!onig_is_prelude()) print_tree(stderr, root);
+ print_tree(stderr, root);
#endif
reg->capture_history = scan_env.capture_history;
@@ -5866,9 +5858,9 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
#ifdef ONIG_DEBUG_COMPILE
#ifdef USE_NAMED_GROUP
- if (!onig_is_prelude()) onig_print_names(stderr, reg);
+ onig_print_names(stderr, reg);
#endif
- if (!onig_is_prelude()) print_compiled_byte_code_list(stderr, reg);
+ print_compiled_byte_code_list(stderr, reg);
#endif
end:
@@ -6064,7 +6056,7 @@ onig_end(void)
exec_end_call_list();
#ifdef ONIG_DEBUG_STATISTICS
- if (!onig_is_prelude()) onig_print_statistics(stderr);
+ onig_print_statistics(stderr);
#endif
#ifdef USE_SHARED_CCLASS_TABLE