From 6848ad6f3081f49704588066a39a0f77cd776f80 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Tue, 26 Mar 2013 15:12:50 +0900 Subject: Remove #if 0 ... #endif code. --- src/array.c | 4 ---- src/parse.y | 14 -------------- 2 files changed, 18 deletions(-) diff --git a/src/array.c b/src/array.c index 5f588e195..f9cc9119c 100644 --- a/src/array.c +++ b/src/array.c @@ -952,11 +952,7 @@ static mrb_value mrb_ary_inspect(mrb_state *mrb, mrb_value ary) { if (RARRAY_LEN(ary) == 0) return mrb_str_new(mrb, "[]", 2); - #if 0 /* THREAD */ - return mrb_exec_recursive(inspect_ary_r, ary, 0); - #else return inspect_ary(mrb, ary, mrb_ary_new(mrb)); - #endif } static mrb_value diff --git a/src/parse.y b/src/parse.y index bdb646799..4826f4336 100644 --- a/src/parse.y +++ b/src/parse.y @@ -395,15 +395,6 @@ new_fcall(parser_state *p, mrb_sym b, node *c) return list4((node*)NODE_FCALL, new_self(p), nsym(b), c); } -#if 0 -// (:vcall self mid) -static node* -new_vcall(parser_state *p, mrb_sym b) -{ - return list3((node*)NODE_VCALL, new_self(p), (node*)b); -} -#endif - // (:super . c) static node* new_super(parser_state *p, node *c) @@ -1790,11 +1781,6 @@ arg : lhs '=' arg | arg tMATCH arg { $$ = call_bin_op(p, $1, "=~", $3); -#if 0 - if (nd_type($1) == NODE_LIT && TYPE($1->nd_lit) == T_REGEXP) { - $$ = reg_named_capture_assign($1->nd_lit, $$); - } -#endif } | arg tNMATCH arg { -- cgit v1.2.3 From eafd5f647a7a9970c86723643d29778e3ca4e49b Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Tue, 26 Mar 2013 15:13:20 +0900 Subject: Remove unused macros. --- src/string.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/string.c b/src/string.c index 79c40e9cc..248ec73bd 100644 --- a/src/string.c +++ b/src/string.c @@ -2068,9 +2068,6 @@ mrb_str_sub(mrb_state *mrb, mrb_value self) mrb_value mrb_cstr_to_inum(mrb_state *mrb, const char *str, int base, int badcheck) { - #define BDIGIT unsigned int - #define BDIGIT_DBL unsigned long - char *end; char sign = 1; int c; -- cgit v1.2.3 From fd49ae0a848214b3c2041b88d561fe4192c61bfd Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Tue, 26 Mar 2013 15:13:52 +0900 Subject: Preprocessor # should be the top of line. --- src/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/string.c b/src/string.c index 248ec73bd..65f21a091 100644 --- a/src/string.c +++ b/src/string.c @@ -2275,7 +2275,7 @@ mrb_cstr_to_dbl(mrb_state *mrb, const char * p, int badcheck) char *end; double d; #if !defined(DBL_DIG) - #define DBL_DIG 16 +# define DBL_DIG 16 #endif enum {max_width = 20}; -- cgit v1.2.3