diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-18 01:54:57 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-18 01:54:57 +0000 |
commit | afd7e4668f8195a98eb45fd82132d3d11eada77f (patch) | |
tree | 9ace92fdcc869453d5e6a2711ddbfb14b2b52a79 | |
parent | c6575865aa2186058b92c976257bb78b1edf4ca6 (diff) | |
download | ruby-afd7e4668f8195a98eb45fd82132d3d11eada77f.tar.gz |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | compile.c | 2 | ||||
-rw-r--r-- | eval.c | 3 | ||||
-rw-r--r-- | eval_error.c | 2 | ||||
-rw-r--r-- | internal.h | 16 | ||||
-rw-r--r-- | iseq.c | 1 | ||||
-rw-r--r-- | iseq.h | 3 | ||||
-rw-r--r-- | parse.y | 5 | ||||
-rw-r--r-- | proc.c | 1 | ||||
-rw-r--r-- | range.c | 2 | ||||
-rw-r--r-- | ruby.c | 2 | ||||
-rw-r--r-- | thread.c | 1 | ||||
-rw-r--r-- | thread_pthread.c | 2 | ||||
-rw-r--r-- | time.c | 3 | ||||
-rw-r--r-- | util.c | 4 | ||||
-rw-r--r-- | vm.c | 2 |
16 files changed, 32 insertions, 29 deletions
@@ -1,3 +1,15 @@ +Sat Jun 18 10:22:39 2011 Tanaka Akira <akr@fsij.org> + + * 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 <akr@fsij.org> * common.mk: dependencies updated. @@ -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) \ @@ -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); @@ -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); @@ -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; @@ -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; @@ -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 */ @@ -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) { @@ -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) @@ -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; @@ -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, @@ -10,6 +10,7 @@ **********************************************************************/ #include "ruby/ruby.h" +#include "internal.h" #include <ctype.h> #include <stdio.h> @@ -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) { @@ -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); |