ruby-changes:20117
From: akr <ko1@a...>
Date: Sat, 18 Jun 2011 17:26:40 +0900 (JST)
Subject: [ruby-changes:20117] akr:r32165 (trunk): * eval.c, hash.c, load.c, proc.c, range.c, thread.c, time.c: don't
akr 2011-06-18 17:26:19 +0900 (Sat, 18 Jun 2011) New Revision: 32165 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32165 Log: * 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. Modified files: trunk/ChangeLog trunk/array.c trunk/common.mk trunk/eval.c trunk/hash.c trunk/internal.h trunk/load.c trunk/proc.c trunk/range.c trunk/thread.c trunk/time.c trunk/vm_core.h Index: array.c =================================================================== --- array.c (revision 32164) +++ array.c (revision 32165) @@ -15,6 +15,7 @@ #include "ruby/util.h" #include "ruby/st.h" #include "ruby/encoding.h" +#include "internal.h" #ifndef ARRAY_DEBUG # define NDEBUG Index: time.c =================================================================== --- time.c (revision 32164) +++ time.c (revision 32165) @@ -4519,7 +4519,6 @@ 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; Index: ChangeLog =================================================================== --- ChangeLog (revision 32164) +++ ChangeLog (revision 32165) @@ -1,3 +1,14 @@ +Sat Jun 18 17:23:38 2011 Tanaka Akira <akr@f...> + + * 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 <akr@f...> * internal.h: declarations declared in include/ruby/*.h removed. Index: vm_core.h =================================================================== --- vm_core.h (revision 32164) +++ vm_core.h (revision 32165) @@ -647,6 +647,8 @@ 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_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 *); Index: load.c =================================================================== --- load.c (revision 32164) +++ load.c (revision 32165) @@ -467,7 +467,6 @@ 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"); Index: range.c =================================================================== --- range.c (revision 32164) +++ range.c (revision 32165) @@ -600,8 +600,6 @@ 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)); } Index: proc.c =================================================================== --- proc.c (revision 32164) +++ proc.c (revision 32165) @@ -1421,8 +1421,6 @@ } 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); Index: thread.c =================================================================== --- thread.c (revision 32164) +++ thread.c (revision 32165) @@ -613,7 +613,6 @@ } 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))) { Index: common.mk =================================================================== --- common.mk (revision 32164) +++ common.mk (revision 32165) @@ -584,7 +584,7 @@ $(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) \ Index: eval.c =================================================================== --- eval.c (revision 32164) +++ eval.c (revision 32165) @@ -115,8 +115,6 @@ 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); Index: hash.c =================================================================== --- hash.c (revision 32164) +++ hash.c (revision 32165) @@ -510,7 +510,6 @@ 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); Index: internal.h =================================================================== --- internal.h (revision 32164) +++ internal.h (revision 32165) @@ -39,6 +39,9 @@ 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_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 @@ /* vm_eval.c */ void Init_vm_eval(void); +VALUE rb_current_realfilepath(void); /* vm_method.c */ void Init_eval_method(void); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/