diff --git a/ChangeLog b/ChangeLog index 5790d5b33e..01c24dbcac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Sat Jun 18 10:22:39 2011 Tanaka Akira + + * internal.h: declare more internal functions. + + * iseq.h (rb_method_get_iseq): declared. + + * compile.c, eval.c, eval_error.c, iseq.c, parse.y, proc.c, range.c, + ruby.c, time.c, util.c, vm.c: don't declare internal functions. + + * eval.c, parse.y, thread_pthread.c: non-existing function declarations + removed. + Sat Jun 18 08:12:54 2011 Tanaka Akira * common.mk: dependencies updated. diff --git a/compile.c b/compile.c index b0e4514f4c..6864d8987e 100644 --- a/compile.c +++ b/compile.c @@ -98,8 +98,6 @@ struct iseq_compile_data_ensure_node_stack { #define compile_debug iseq->compile_data->option->debug_level #endif -NORETURN(PRINTF_ARGS(void rb_compile_bug(const char*, int, const char*, ...), 3, 4)); - #if CPDEBUG #define compile_debug_print_indent(level) \ diff --git a/eval.c b/eval.c index 87a1ac2e2c..ba73fdefb8 100644 --- a/eval.c +++ b/eval.c @@ -21,11 +21,8 @@ #define numberof(array) (int)(sizeof(array) / sizeof((array)[0])) -VALUE proc_invoke(VALUE, VALUE, VALUE, VALUE); -VALUE rb_binding_new(void); NORETURN(void rb_raise_jump(VALUE)); -ID rb_frame_callee(void); VALUE rb_eLocalJumpError; VALUE rb_eSysStackError; diff --git a/eval_error.c b/eval_error.c index b65ce17d0b..fd06adf92d 100644 --- a/eval_error.c +++ b/eval_error.c @@ -38,8 +38,6 @@ error_pos(void) } } -VALUE rb_check_backtrace(VALUE); - static VALUE get_backtrace(VALUE info) { diff --git a/internal.h b/internal.h index 0bcfb7b8c4..c95c5f87f6 100644 --- a/internal.h +++ b/internal.h @@ -25,6 +25,8 @@ struct rb_classext_struct { struct st_table *const_tbl; }; +struct vtm; /* defined by timev.h */ + /* bignum.c */ VALUE rb_big_fdiv(VALUE x, VALUE y); VALUE rb_big_uminus(VALUE x); @@ -40,6 +42,7 @@ int rb_dvar_defined(ID); int rb_local_defined(ID); int rb_parse_in_eval(void); int rb_parse_in_main(void); +VALUE rb_insns_name_array(void); /* debug.c */ PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2); @@ -53,10 +56,19 @@ ID rb_id_encoding(void); /* encoding.c */ void rb_gc_mark_encodings(void); +/* error.c */ +NORETURN(PRINTF_ARGS(void rb_compile_bug(const char*, int, const char*, ...), 3, 4)); +VALUE rb_check_backtrace(VALUE); + +/* eval.c */ +ID rb_frame_callee(void); + /* file.c */ VALUE rb_home_dir(const char *user, VALUE result); VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict); void Init_File(void); +const char *ruby_find_basename(const char *, long *, long *); +const char *ruby_find_extname(const char *, long *); /* gc.c */ void Init_heap(void); @@ -88,6 +100,7 @@ void Init_newline(void); /* numeric.c */ VALUE rb_rational_reciprocal(VALUE x); int rb_num_to_uint(VALUE val, unsigned int *ret); +int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl); /* parse.y */ VALUE rb_parser_get_yydebug(VALUE); @@ -103,6 +116,9 @@ VALUE rb_reg_check_preprocess(VALUE); /* signal.c */ int rb_get_next_signal(void); +/* strftime.c */ +size_t rb_strftime_timespec(char *s, size_t maxsize, const char *format, const struct vtm *vtm, struct timespec *ts, int gmt); + /* string.c */ int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p); diff --git a/iseq.c b/iseq.c index 25fc792955..d1d8b4124a 100644 --- a/iseq.c +++ b/iseq.c @@ -1024,7 +1024,6 @@ iseq_s_disasm(VALUE klass, VALUE body) { VALUE ret = Qnil; rb_iseq_t *iseq; - extern rb_iseq_t *rb_method_get_iseq(VALUE body); rb_secure(1); diff --git a/iseq.h b/iseq.h index b626682bed..ebdee1101f 100644 --- a/iseq.h +++ b/iseq.h @@ -27,6 +27,9 @@ VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt); VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc); struct st_table *ruby_insn_make_insn_table(void); +/* proc.c */ +rb_iseq_t *rb_method_get_iseq(VALUE body); + struct rb_compile_option_struct { int inline_const_cache; int peephole_optimization; diff --git a/parse.y b/parse.y index 59e5d8d3f1..f253922306 100644 --- a/parse.y +++ b/parse.y @@ -10107,9 +10107,6 @@ static const rb_data_type_t parser_data_type = { }, }; -VALUE rb_parser_get_yydebug(VALUE); -VALUE rb_parser_set_yydebug(VALUE, VALUE); - #ifndef RIPPER #undef rb_reserved_word @@ -10584,8 +10581,6 @@ ripper_initialize(int argc, VALUE *argv, VALUE self) return Qnil; } -extern VALUE rb_thread_pass(void); - struct ripper_args { struct parser_params *parser; int argc; diff --git a/proc.c b/proc.c index 7fae4f97ed..b4afe648b6 100644 --- a/proc.c +++ b/proc.c @@ -28,7 +28,6 @@ VALUE rb_cProc; static VALUE bmcall(VALUE, VALUE); static int method_arity(VALUE); -rb_iseq_t *rb_method_get_iseq(VALUE method); /* Proc */ diff --git a/range.c b/range.c index aa5472df06..8a77add7d7 100644 --- a/range.c +++ b/range.c @@ -305,8 +305,6 @@ step_i(VALUE i, void *arg) return Qnil; } -extern int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl); - static int discrete_object_p(VALUE obj) { diff --git a/ruby.c b/ruby.c index d93a908cc8..f831b651c7 100644 --- a/ruby.c +++ b/ruby.c @@ -160,8 +160,6 @@ usage(const char *name) printf(" %s\n", *p++); } -VALUE rb_get_load_path(void); - #ifdef MANGLED_PATH static VALUE rubylib_mangled_path(const char *s, unsigned int l) diff --git a/thread.c b/thread.c index 4ea9f7e09c..18a1cbfbee 100644 --- a/thread.c +++ b/thread.c @@ -406,7 +406,6 @@ thread_cleanup_func(void *th_ptr, int atfork) native_thread_destroy(th); } -extern void ruby_error_print(void); static VALUE rb_threadptr_raise(rb_thread_t *, int, VALUE *); void diff --git a/thread_pthread.c b/thread_pthread.c index ff9de86379..d8e4d11ee8 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -627,8 +627,6 @@ thread_start_func_1(void *th_ptr) return 0; } -void rb_thread_create_control_thread(void); - struct cached_thread_entry { volatile rb_thread_t **th_area; pthread_cond_t *cond; diff --git a/time.c b/time.c index 0951e9a8a7..5e69ff5dbb 100644 --- a/time.c +++ b/time.c @@ -4285,9 +4285,6 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct vtm *vtm, VALUE timev, int gmt); -size_t -rb_strftime_timespec(char *s, size_t maxsize, const char *format, const struct vtm *vtm, struct timespec *ts, int gmt); - #define SMALLBUF 100 static size_t rb_strftime_alloc(char **buf, const char *format, diff --git a/util.c b/util.c index 8a443f913f..99532a13d2 100644 --- a/util.c +++ b/util.c @@ -10,6 +10,7 @@ **********************************************************************/ #include "ruby/ruby.h" +#include "internal.h" #include #include @@ -261,9 +262,6 @@ static const char suffix2[] = ".~~~"; #define strEQ(s1,s2) (strcmp((s1),(s2)) == 0) -extern const char *ruby_find_basename(const char *, long *, long *); -extern const char *ruby_find_extname(const char *, long *); - void ruby_add_suffix(VALUE str, const char *suffix) { diff --git a/vm.c b/vm.c index eacc6740e3..f2b6b7f5d3 100644 --- a/vm.c +++ b/vm.c @@ -46,8 +46,6 @@ rb_vm_t *ruby_current_vm = 0; static void thread_free(void *ptr); -VALUE rb_insns_name_array(void); - void vm_analysis_operand(int insn, int n, VALUE op); void vm_analysis_register(int reg, int isset); void vm_analysis_insn(int insn);