diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-18 08:26:19 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-18 08:26:19 +0000 |
commit | 5ed8c08aa0277b30e00cb27cc2da1d785c145170 (patch) | |
tree | 3396090647bc228d0cfd94dcda9fc27d9ad2e999 | |
parent | bc46292caa9ce7114856c0e035ad3bec3114ba32 (diff) |
* eval.c, hash.c, load.c, proc.c, range.c, thread.c, time.c: don't
declare internal functions.
* internal.h, vm_core.h: declare internal functions.
* array.c: include internal.h.
* common.mk: update dependency for array.o.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | array.c | 1 | ||||
-rw-r--r-- | common.mk | 2 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | hash.c | 1 | ||||
-rw-r--r-- | internal.h | 7 | ||||
-rw-r--r-- | load.c | 1 | ||||
-rw-r--r-- | proc.c | 2 | ||||
-rw-r--r-- | range.c | 2 | ||||
-rw-r--r-- | thread.c | 1 | ||||
-rw-r--r-- | time.c | 1 | ||||
-rw-r--r-- | vm_core.h | 3 |
12 files changed, 23 insertions, 11 deletions
@@ -1,3 +1,14 @@ +Sat Jun 18 17:23:38 2011 Tanaka Akira <[email protected]> + + * eval.c, hash.c, load.c, proc.c, range.c, thread.c, time.c: don't + declare internal functions. + + * internal.h, vm_core.h: declare internal functions. + + * array.c: include internal.h. + + * common.mk: update dependency for array.o. + Sat Jun 18 13:39:33 2011 Tanaka Akira <[email protected]> * internal.h: declarations declared in include/ruby/*.h removed. @@ -15,6 +15,7 @@ #include "ruby/util.h" #include "ruby/st.h" #include "ruby/encoding.h" +#include "internal.h" #ifndef ARRAY_DEBUG # define NDEBUG @@ -584,7 +584,7 @@ VM_CORE_H_INCLUDES = {$(VPATH)}vm_core.h {$(VPATH)}thread_$(THREAD_MODEL).h \ $(ID_H_INCLUDES) array.$(OBJEXT): {$(VPATH)}array.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \ - $(ENCODING_H_INCLUDES) + $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h bignum.$(OBJEXT): {$(VPATH)}bignum.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \ {$(VPATH)}internal.h class.$(OBJEXT): {$(VPATH)}class.c $(RUBY_H_INCLUDES) \ @@ -115,8 +115,6 @@ ruby_cleanup(volatile int ex) volatile VALUE errs[2]; rb_thread_t *th = GET_THREAD(); int nerr; - void rb_threadptr_interrupt(rb_thread_t *th); - void rb_threadptr_check_signal(rb_thread_t *mth); rb_threadptr_interrupt(th); rb_threadptr_check_signal(th); @@ -510,7 +510,6 @@ rb_hash_aref(VALUE hash, VALUE key) st_data_t val; if (!RHASH(hash)->ntbl || !st_lookup(RHASH(hash)->ntbl, key, &val)) { - int rb_method_basic_definition_p(VALUE klass, ID id); if (!FL_TEST(hash, HASH_PROC_DEFAULT) && rb_method_basic_definition_p(CLASS_OF(hash), id_default)) { return RHASH_IFNONE(hash); diff --git a/internal.h b/internal.h index 3a80460b9e..c242f450e3 100644 --- a/internal.h +++ b/internal.h @@ -39,6 +39,9 @@ struct rb_classext_struct { struct vtm; /* defined by timev.h */ +/* array.c */ +VALUE rb_ary_last(int, VALUE *, VALUE); + /* bignum.c */ VALUE rb_big_fdiv(VALUE x, VALUE y); VALUE rb_big_uminus(VALUE x); @@ -123,6 +126,9 @@ VALUE rb_obj_equal(VALUE obj1, VALUE obj2); VALUE rb_parser_get_yydebug(VALUE); VALUE rb_parser_set_yydebug(VALUE, VALUE); +/* proc.c */ +VALUE rb_proc_location(VALUE self); + /* rational.c */ VALUE rb_lcm(VALUE x, VALUE y); @@ -173,6 +179,7 @@ void rb_vm_bugreport(void); /* vm_eval.c */ void Init_vm_eval(void); +VALUE rb_current_realfilepath(void); /* vm_method.c */ void Init_eval_method(void); @@ -467,7 +467,6 @@ rb_f_require(VALUE obj, VALUE fname) VALUE rb_f_require_relative(VALUE obj, VALUE fname) { - VALUE rb_current_realfilepath(void); VALUE base = rb_current_realfilepath(); if (NIL_P(base)) { rb_raise(rb_eLoadError, "cannot infer basepath"); @@ -1421,8 +1421,6 @@ rb_method_call(int argc, VALUE *argv, VALUE method) } if ((state = EXEC_TAG()) == 0) { rb_thread_t *th = GET_THREAD(); - VALUE rb_vm_call(rb_thread_t *th, VALUE recv, VALUE id, int argc, const VALUE *argv, - const rb_method_entry_t *me); PASS_PASSED_BLOCK_TH(th); result = rb_vm_call(th, data->recv, data->id, argc, argv, &data->me); @@ -600,8 +600,6 @@ range_first(int argc, VALUE *argv, VALUE range) static VALUE range_last(int argc, VALUE *argv, VALUE range) { - VALUE rb_ary_last(int, VALUE *, VALUE); - if (argc == 0) return RANGE_END(range); return rb_ary_last(argc, argv, rb_Array(range)); } @@ -613,7 +613,6 @@ thread_initialize(VALUE thread, VALUE args) } GetThreadPtr(thread, th); if (th->first_args) { - VALUE rb_proc_location(VALUE self); VALUE proc = th->first_proc, line, loc; const char *file; if (!proc || !RTEST(loc = rb_proc_location(proc))) { @@ -4519,7 +4519,6 @@ strftimev(const char *fmt, VALUE time) static VALUE time_strftime(VALUE time, VALUE format) { - void rb_enc_copy(VALUE, VALUE); struct time_object *tobj; char buffer[SMALLBUF], *buf = buffer; const char *fmt; @@ -647,6 +647,8 @@ VALUE rb_vm_make_proc(rb_thread_t *th, const rb_block_t *block, VALUE klass); VALUE rb_vm_make_env_object(rb_thread_t *th, rb_control_frame_t *cfp); void rb_vm_inc_const_missing_count(void); void rb_vm_gvl_destroy(rb_vm_t *vm); +VALUE rb_vm_call(rb_thread_t *th, VALUE recv, VALUE id, int argc, + const VALUE *argv, const rb_method_entry_t *me); void rb_thread_start_timer_thread(void); void rb_thread_stop_timer_thread(void); @@ -698,6 +700,7 @@ void rb_threadptr_check_signal(rb_thread_t *mth); void rb_threadptr_signal_raise(rb_thread_t *th, int sig); void rb_threadptr_signal_exit(rb_thread_t *th); void rb_threadptr_execute_interrupts(rb_thread_t *); +void rb_threadptr_interrupt(rb_thread_t *th); void rb_thread_lock_unlock(rb_thread_lock_t *); void rb_thread_lock_destroy(rb_thread_lock_t *); |