diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-03-08 00:23:14 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-03-08 00:23:14 +0000 |
commit | c49418522dec35ce043e0a9736fae32217002384 (patch) | |
tree | ec395914e069f04d77a08f9af7fb8bbc229227e0 | |
parent | 835f040be29b1a32f93428a6a90de7978b7c2779 (diff) |
* compile.c: iseq_compile -> rb_iseq_compile.
* iseq.c: ditto.
* intern.h: provide function prototype of Init_jump.
* eval_jump.h (Init_jump): declare function type.
* thread.c: platform-dependent functions should be surrounded by #ifdef.
* iseq.c (iseq_data_to_ary): remove unused variable.
* compile.c (set_arguments): ditto.
* thread.c (set_unblock_function): ditto.
* thread_pthread.ci: reduce printf warning.
* vm_dump.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 22 | ||||
-rw-r--r-- | compile.c | 3 | ||||
-rw-r--r-- | eval_jump.h | 2 | ||||
-rw-r--r-- | intern.h | 1 | ||||
-rw-r--r-- | iseq.c | 4 | ||||
-rw-r--r-- | thread.c | 3 | ||||
-rw-r--r-- | thread_pthread.ci | 6 | ||||
-rw-r--r-- | vm_dump.c | 2 |
8 files changed, 33 insertions, 10 deletions
@@ -1,3 +1,25 @@ +Thu Mar 8 09:17:59 2007 Minero Aoki <[email protected]> + + * compile.c: iseq_compile -> rb_iseq_compile. + + * iseq.c: ditto. + + * intern.h: provide function prototype of Init_jump. + + * eval_jump.h (Init_jump): declare function type. + + * thread.c: platform-dependent functions should be surrounded by #ifdef. + + * iseq.c (iseq_data_to_ary): remove unused variable. + + * compile.c (set_arguments): ditto. + + * thread.c (set_unblock_function): ditto. + + * thread_pthread.ci: reduce printf warning. + + * vm_dump.c: ditto. + Tue Mar 6 16:35:04 2007 Keiju Ishitsuka <[email protected]> * lib/shell/process-controller.rb: fix thread synchronization problem for [ruby-dev:30477]. @@ -138,7 +138,7 @@ iseq_add_mark_object_compile_time(rb_iseq_t *iseq, VALUE v) #endif VALUE -iseq_compile(VALUE self, NODE *narg) +rb_iseq_compile(VALUE self, NODE *narg) { DECL_ANCHOR(list_anchor); rb_iseq_t *iseq; @@ -1097,7 +1097,6 @@ static int set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_arg) { NODE *node_aux = node_arg->nd_next; - int mandatory_len = 0; NODE *node_opt = 0; ID rest_id = 0; ID block_id = 0; diff --git a/eval_jump.h b/eval_jump.h index a48a5357fd..aa2d84a3fe 100644 --- a/eval_jump.h +++ b/eval_jump.h @@ -402,7 +402,7 @@ rb_exec_end_proc(void) } void -Init_jump() +Init_jump(void) { rb_define_global_function("catch", rb_f_catch, 1); rb_define_global_function("throw", rb_f_throw, -1); @@ -255,6 +255,7 @@ VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*); void rb_set_end_proc(void (*)(VALUE), VALUE); void rb_mark_end_proc(void); void rb_exec_end_proc(void); +void Init_jump(void); void ruby_finalize(void); NORETURN(void ruby_stop(int)); int ruby_cleanup(int); @@ -272,7 +272,7 @@ rb_iseq_new_with_bopt_and_opt(NODE *node, VALUE name, VALUE filename, iseq->self = self; prepare_iseq_build(iseq, name, filename, parent, type, bopt, option); - iseq_compile(self, node); + rb_iseq_compile(self, node); cleanup_iseq_build(iseq); return self; } @@ -1076,7 +1076,7 @@ cdhash_each(VALUE key, VALUE value, VALUE ary) VALUE iseq_data_to_ary(rb_iseq_t *iseq) { - int i, pos, opt = 0; + int i, pos; VALUE *seq; VALUE val = rb_ary_new(); @@ -191,7 +191,6 @@ static rb_unblock_function_t * set_unblock_function(rb_thread_t *th, rb_unblock_function_t *func) { rb_unblock_function_t *oldfunc; - int interrupted; check_ints: RUBY_VM_CHECK_INTS(); /* check signal or so */ @@ -1652,6 +1651,7 @@ rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int max) #endif +#if defined(__CYGWIN__) || defined(_WIN32) static long cmp_tv(const struct timeval *a, const struct timeval *b) { @@ -1673,6 +1673,7 @@ subst(struct timeval *rest, const struct timeval *wait) rest->tv_usec -= wait->tv_usec; return 1; } +#endif static int do_select(int n, fd_set *read, fd_set *write, fd_set *except, diff --git a/thread_pthread.ci b/thread_pthread.ci index 1b9d1b9c53..595bb8e8fb 100644 --- a/thread_pthread.ci +++ b/thread_pthread.ci @@ -236,7 +236,7 @@ native_thread_create(rb_thread_t *th) CHECK_ERR(pthread_attr_init(&attr)); #ifdef PTHREAD_STACK_MIN - thread_debug("create - stack size: %u\n", stack_size); + thread_debug("create - stack size: %lu\n", (unsigned long)stack_size); CHECK_ERR(pthread_attr_setstacksize(&attr, stack_size)); #endif @@ -353,8 +353,8 @@ native_sleep(rb_thread_t *th, struct timeval *tv) } else { int r; - thread_debug("native_sleep: pthread_cond_timedwait start (%d, %ld)\n", - ts.tv_sec, ts.tv_nsec); + thread_debug("native_sleep: pthread_cond_timedwait start (%ld, %ld)\n", + (unsigned long)ts.tv_sec, ts.tv_nsec); r = pthread_cond_timedwait(&th->native_thread_data.sleep_cond, &th->interrupt_lock, &ts); thread_debug("native_sleep: pthread_cond_timedwait end (%d)\n", r); @@ -122,7 +122,7 @@ control_frame_dump(rb_thread_t *th, rb_control_frame_t *cfp) else { fprintf(stderr, "p:%04d ", pc); } - fprintf(stderr, "s:%04ld b:%04d ", cfp->sp - th->stack, bp); + fprintf(stderr, "s:%04d b:%04d ", cfp->sp - th->stack, bp); fprintf(stderr, lfp_in_heap == ' ' ? "l:%06d " : "l:%06p ", lfp % 10000); fprintf(stderr, dfp_in_heap == ' ' ? "d:%06d " : "d:%06p ", dfp % 10000); fprintf(stderr, "%-6s ", magic); |