diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-05-16 08:21:16 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-05-16 08:21:16 -0700 |
| commit | 9d67c3c40875018eb3f33870fa35ad2e5d547081 (patch) | |
| tree | c22b15c626b4bcc6d13cdfa65e1698086e461930 /src | |
| parent | bc2314e625065b19a018f88485a5879fa26013ab (diff) | |
| parent | 3407376936e93ad6270a838705e4e46c5594ad96 (diff) | |
| download | mruby-9d67c3c40875018eb3f33870fa35ad2e5d547081.tar.gz mruby-9d67c3c40875018eb3f33870fa35ad2e5d547081.zip | |
Merge pull request #140 from monaka/pr-remove-unused-static-functions
Remove unused static functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/class.c | 1 | ||||
| -rw-r--r-- | src/encoding.c | 6 | ||||
| -rw-r--r-- | src/encoding.h | 1 | ||||
| -rw-r--r-- | src/error.c | 23 | ||||
| -rw-r--r-- | src/numeric.c | 2 | ||||
| -rw-r--r-- | src/parse.y | 1 | ||||
| -rw-r--r-- | src/range.c | 2 | ||||
| -rw-r--r-- | src/re.c | 3 | ||||
| -rw-r--r-- | src/string.c | 1 | ||||
| -rw-r--r-- | src/struct.c | 2 |
10 files changed, 0 insertions, 42 deletions
diff --git a/src/class.c b/src/class.c index 1109c1e2b..7cb25f5c4 100644 --- a/src/class.c +++ b/src/class.c @@ -34,7 +34,6 @@ typedef struct fc_result { struct fc_result *prev; } fcresult_t; -struct RClass* mrb_class_real(struct RClass* cl); int kiv_lookup(khash_t(iv) *table, mrb_sym key, mrb_value *value); extern struct kh_iv *mrb_class_tbl; diff --git a/src/encoding.c b/src/encoding.c index b04cff33b..8a3bd8ef2 100644 --- a/src/encoding.c +++ b/src/encoding.c @@ -84,12 +84,6 @@ enum { #define mrb_usascii_str_new2 mrb_usascii_str_new_cstr -static size_t -enc_memsize(mrb_state *mrb, const void *p) -{ - return 0; -} - static const struct mrb_data_type encoding_data_type = { "encoding", 0, }; diff --git a/src/encoding.h b/src/encoding.h index b923ab98f..c6c470644 100644 --- a/src/encoding.h +++ b/src/encoding.h @@ -92,7 +92,6 @@ int mrb_toupper(int c); typedef OnigEncodingType mrb_encoding; -mrb_encoding* mrb_enc_get(mrb_state *mrb, mrb_value obj); /* mrb_encoding * -> name */ #define mrb_enc_name(enc) (enc)->name int mrb_enc_get_index(mrb_state *mrb, mrb_value obj); diff --git a/src/error.c b/src/error.c index f57f0e5e6..8dd800885 100644 --- a/src/error.c +++ b/src/error.c @@ -404,29 +404,6 @@ mrb_sys_fail(mrb_state *mrb, const char *mesg) mrb_raise(mrb, mrb->eRuntimeError_class, "%s", mesg); } -static mrb_value -mrb_exc_c_exception(mrb_state *mrb, mrb_value exc) -{ - mrb_value *argv; - int argc; - - mrb_get_args(mrb, "*", &argv, &argc); - return mrb_make_exception(mrb, argc, argv); -} - -static mrb_value -mrb_exc_exception(mrb_state *mrb, mrb_value exc) -{ - mrb_value *argv; - int argc; - mrb_value exclass; - - mrb_get_args(mrb, "*", &argv, &argc); - if (argc == 0) return exc; - exclass = mrb_obj_value(mrb_class(mrb, exc)); - return mrb_funcall(mrb, exclass, "exception", argc, argv); -} - void mrb_init_exception(mrb_state *mrb) { diff --git a/src/numeric.c b/src/numeric.c index ab6a014cc..c005e519e 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -37,8 +37,6 @@ #define fmod(x,y) fmodf(x,y) #endif -void mrb_cmperr(mrb_state *mrb, mrb_value x, mrb_value y); - void mrb_num_zerodiv(mrb_state *mrb) { diff --git a/src/parse.y b/src/parse.y index 4c339f0f4..45a024b0b 100644 --- a/src/parse.y +++ b/src/parse.y @@ -4726,7 +4726,6 @@ mrb_parse_string(mrb_state *mrb, const char *s) #define PARSER_DUMP void parser_dump(mrb_state *mrb, node *tree, int offset); -int mrb_generate_code(mrb_state*, mrb_ast_node*); int mrb_compile_file(mrb_state * mrb, FILE *f) diff --git a/src/range.c b/src/range.c index c38fc0f5f..14024f29b 100644 --- a/src/range.c +++ b/src/range.c @@ -32,8 +32,6 @@ mrb_value mrb_exec_recursive_paired(mrb_state *mrb, mrb_value (*func) (mrb_state *, mrb_value, mrb_value, int), mrb_value obj, mrb_value paired_obj, void* arg); -int printf (const char*, ...); - mrb_value mrb_range_new(mrb_state *mrb, mrb_value beg, mrb_value end, int excl) { @@ -54,14 +54,11 @@ unsigned long ruby_scan_oct(const char *, size_t, size_t *); unsigned long ruby_scan_hex(const char *, size_t, size_t *); static mrb_value mrb_match_to_a(mrb_state *mrb, mrb_value match); -int re_adjust_startpos(struct re_pattern_buffer *bufp, const char *string, int size, int startpos, int range); static mrb_value mrb_reg_preprocess(mrb_state *mrb, const char *p, const char *end, mrb_encoding *enc, mrb_encoding **fixed_enc, onig_errmsg_buffer err); static void mrb_reg_expr_str(mrb_state *mrb, mrb_value str, const char *s, long len, mrb_encoding *enc, mrb_encoding *resenc); static char * option_to_str(char str[4], int options); -mrb_value match_alloc(mrb_state *mrb); -void mrb_warn(const char *fmt, ...); static mrb_value reg_cache; //static int may_need_recompile; diff --git a/src/string.c b/src/string.c index dc7fdfae8..8a5dd7072 100644 --- a/src/string.c +++ b/src/string.c @@ -47,7 +47,6 @@ static mrb_value str_replace(mrb_state *mrb, mrb_value str, mrb_value str2); #ifdef INCLUDE_ENCODING static long str_strlen(mrb_state *mrb, mrb_value str, mrb_encoding *enc); #endif //INCLUDE_ENCODING -int mrb_block_given_p(); #ifdef INCLUDE_ENCODING #define is_ascii_string(mrb, str) (mrb_enc_str_coderange(mrb, str) == ENC_CODERANGE_7BIT) #define is_broken_string(mrb, str) (mrb_enc_str_coderange(mrb, str) == ENC_CODERANGE_BROKEN) diff --git a/src/struct.c b/src/struct.c index 767f8fbd4..ff66b19a2 100644 --- a/src/struct.c +++ b/src/struct.c @@ -31,8 +31,6 @@ mrb_value mrb_exec_recursive_paired(mrb_state *mrb, mrb_value (*func) (mrb_state #define mrb_long2int(n) ((int)(n)) -static mrb_value struct_alloc(mrb_state *mrb, mrb_value); - static struct RClass * struct_class(mrb_state *mrb) { |
