ruby-changes:27560
From: nobu <ko1@a...>
Date: Wed, 6 Mar 2013 15:30:21 +0900 (JST)
Subject: [ruby-changes:27560] nobu:r39611 (trunk): prefix global symbols
nobu 2013-03-06 15:30:03 +0900 (Wed, 06 Mar 2013) New Revision: 39611 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39611 Log: prefix global symbols * iseq.c (rb_insn_operand_intern): prefix global symbols. * numeric.c (ruby_num_interval_step_size): ditto. * vm_backtrace.c (rb_vm_backtrace_str_ary), (rb_vm_backtrace_location_ary, rb_vm_thread_backtrace), (rb_vm_thread_backtrace_locations): ditto. * vm_trace.c (rb_vm_trace_mark_event_hooks): ditto. Modified files: trunk/internal.h trunk/iseq.c trunk/numeric.c trunk/range.c trunk/thread.c trunk/vm.c trunk/vm_backtrace.c trunk/vm_eval.c trunk/vm_trace.c Index: iseq.c =================================================================== --- iseq.c (revision 39610) +++ iseq.c (revision 39611) @@ -1119,9 +1119,9 @@ id_to_name(ID id, VALUE default_value) https://github.com/ruby/ruby/blob/trunk/iseq.c#L1119 } VALUE -insn_operand_intern(rb_iseq_t *iseq, - VALUE insn, int op_no, VALUE op, - int len, size_t pos, VALUE *pnop, VALUE child) +rb_insn_operand_intern(rb_iseq_t *iseq, + VALUE insn, int op_no, VALUE op, + int len, size_t pos, VALUE *pnop, VALUE child) { const char *types = insn_op_types(insn); char type = types[op_no]; @@ -1268,9 +1268,9 @@ rb_iseq_disasm_insn(VALUE ret, VALUE *is https://github.com/ruby/ruby/blob/trunk/iseq.c#L1268 for (j = 0; types[j]; j++) { const char *types = insn_op_types(insn); - VALUE opstr = insn_operand_intern(iseqdat, insn, j, iseq[pos + j + 1], - len, pos, &iseq[pos + j + 2], - child); + VALUE opstr = rb_insn_operand_intern(iseqdat, insn, j, iseq[pos + j + 1], + len, pos, &iseq[pos + j + 2], + child); rb_str_concat(str, opstr); if (types[j + 1]) { Index: vm_eval.c =================================================================== --- vm_eval.c (revision 39610) +++ vm_eval.c (revision 39611) @@ -20,7 +20,7 @@ static void vm_set_eval_stack(rb_thread_ https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L20 static int vm_collect_local_variables_in_heap(rb_thread_t *th, VALUE *dfp, VALUE ary); /* vm_backtrace.c */ -VALUE vm_backtrace_str_ary(rb_thread_t *th, int lev, int n); +VALUE rb_vm_backtrace_str_ary(rb_thread_t *th, int lev, int n); typedef enum call_type { CALL_PUBLIC, @@ -1250,7 +1250,7 @@ eval_string_with_cref(VALUE self, VALUE https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1250 errat = rb_get_backtrace(errinfo); mesg = rb_attr_get(errinfo, id_mesg); if (!NIL_P(errat) && RB_TYPE_P(errat, T_ARRAY) && - (bt2 = vm_backtrace_str_ary(th, 0, 0), RARRAY_LEN(bt2) > 0)) { + (bt2 = rb_vm_backtrace_str_ary(th, 0, 0), RARRAY_LEN(bt2) > 0)) { if (!NIL_P(mesg) && RB_TYPE_P(mesg, T_STRING) && !RSTRING_LEN(mesg)) { if (OBJ_FROZEN(mesg)) { VALUE m = rb_str_cat(rb_str_dup(RARRAY_PTR(errat)[0]), ": ", 2); Index: range.c =================================================================== --- range.c (revision 39610) +++ range.c (revision 39611) @@ -340,7 +340,7 @@ range_step_size(VALUE range, VALUE args) https://github.com/ruby/ruby/blob/trunk/range.c#L340 } if (rb_obj_is_kind_of(b, rb_cNumeric) && rb_obj_is_kind_of(e, rb_cNumeric)) { - return num_interval_step_size(b, e, step, EXCL(range)); + return ruby_num_interval_step_size(b, e, step, EXCL(range)); } return Qnil; } @@ -706,7 +706,7 @@ range_size(VALUE range) https://github.com/ruby/ruby/blob/trunk/range.c#L706 { VALUE b = RANGE_BEG(range), e = RANGE_END(range); if (rb_obj_is_kind_of(b, rb_cNumeric) && rb_obj_is_kind_of(e, rb_cNumeric)) { - return num_interval_step_size(b, e, INT2FIX(1), EXCL(range)); + return ruby_num_interval_step_size(b, e, INT2FIX(1), EXCL(range)); } return Qnil; } Index: thread.c =================================================================== --- thread.c (revision 39610) +++ thread.c (revision 39611) @@ -4904,7 +4904,7 @@ rb_exec_recursive_outer(VALUE (*func) (V https://github.com/ruby/ruby/blob/trunk/thread.c#L4904 static VALUE rb_thread_backtrace_m(int argc, VALUE *argv, VALUE thval) { - return vm_thread_backtrace(argc, argv, thval); + return rb_vm_thread_backtrace(argc, argv, thval); } /* call-seq: @@ -4921,7 +4921,7 @@ rb_thread_backtrace_m(int argc, VALUE *a https://github.com/ruby/ruby/blob/trunk/thread.c#L4921 static VALUE rb_thread_backtrace_locations_m(int argc, VALUE *argv, VALUE thval) { - return vm_thread_backtrace_locations(argc, argv, thval); + return rb_vm_thread_backtrace_locations(argc, argv, thval); } /* Index: vm_backtrace.c =================================================================== --- vm_backtrace.c (revision 39610) +++ vm_backtrace.c (revision 39611) @@ -629,13 +629,13 @@ backtrace_load_data(VALUE self, VALUE st https://github.com/ruby/ruby/blob/trunk/vm_backtrace.c#L629 } VALUE -vm_backtrace_str_ary(rb_thread_t *th, long lev, long n) +rb_vm_backtrace_str_ary(rb_thread_t *th, long lev, long n) { return backtrace_to_str_ary(backtrace_object(th), lev, n); } VALUE -vm_backtrace_location_ary(rb_thread_t *th, long lev, long n) +rb_vm_backtrace_location_ary(rb_thread_t *th, long lev, long n) { return backtrace_to_location_ary(backtrace_object(th), lev, n); } @@ -754,7 +754,7 @@ rb_backtrace(void) https://github.com/ruby/ruby/blob/trunk/vm_backtrace.c#L754 VALUE rb_make_backtrace(void) { - return vm_backtrace_str_ary(GET_THREAD(), 0, 0); + return rb_vm_backtrace_str_ary(GET_THREAD(), 0, 0); } static VALUE @@ -839,13 +839,13 @@ thread_backtrace_to_ary(int argc, VALUE https://github.com/ruby/ruby/blob/trunk/vm_backtrace.c#L839 } VALUE -vm_thread_backtrace(int argc, VALUE *argv, VALUE thval) +rb_vm_thread_backtrace(int argc, VALUE *argv, VALUE thval) { return thread_backtrace_to_ary(argc, argv, thval, 1); } VALUE -vm_thread_backtrace_locations(int argc, VALUE *argv, VALUE thval) +rb_vm_thread_backtrace_locations(int argc, VALUE *argv, VALUE thval) { return thread_backtrace_to_ary(argc, argv, thval, 0); } @@ -1123,7 +1123,7 @@ rb_debug_inspector_open(rb_debug_inspect https://github.com/ruby/ruby/blob/trunk/vm_backtrace.c#L1123 dbg_context.th = th; dbg_context.cfp = dbg_context.th->cfp; - dbg_context.backtrace = vm_backtrace_location_ary(th, 0, 0); + dbg_context.backtrace = rb_vm_backtrace_location_ary(th, 0, 0); dbg_context.backtrace_size = RARRAY_LEN(dbg_context.backtrace); dbg_context.contexts = collect_caller_bindings(th); Index: vm_trace.c =================================================================== --- vm_trace.c (revision 39610) +++ vm_trace.c (revision 39611) @@ -48,7 +48,7 @@ static int ruby_event_flag_count[MAX_EVE https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L48 /* called from vm.c */ void -vm_trace_mark_event_hooks(rb_hook_list_t *hooks) +rb_vm_trace_mark_event_hooks(rb_hook_list_t *hooks) { rb_event_hook_t *hook = hooks->hooks; Index: numeric.c =================================================================== --- numeric.c (revision 39610) +++ numeric.c (revision 39611) @@ -1811,7 +1811,7 @@ ruby_float_step(VALUE from, VALUE to, VA https://github.com/ruby/ruby/blob/trunk/numeric.c#L1811 } VALUE -num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl) +ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl) { if (FIXNUM_P(from) && FIXNUM_P(to) && FIXNUM_P(step)) { long delta, diff, result; @@ -1847,7 +1847,7 @@ num_step_size(VALUE from, VALUE args) https://github.com/ruby/ruby/blob/trunk/numeric.c#L1847 { VALUE to = RARRAY_PTR(args)[0]; VALUE step = (RARRAY_LEN(args) > 1) ? RARRAY_PTR(args)[1] : INT2FIX(1); - return num_interval_step_size(from, to, step, FALSE); + return ruby_num_interval_step_size(from, to, step, FALSE); } /* * call-seq: @@ -3466,7 +3466,7 @@ fix_size(VALUE fix) https://github.com/ruby/ruby/blob/trunk/numeric.c#L3466 static VALUE int_upto_size(VALUE from, VALUE args) { - return num_interval_step_size(from, RARRAY_PTR(args)[0], INT2FIX(1), FALSE); + return ruby_num_interval_step_size(from, RARRAY_PTR(args)[0], INT2FIX(1), FALSE); } /* @@ -3513,7 +3513,7 @@ int_upto(VALUE from, VALUE to) https://github.com/ruby/ruby/blob/trunk/numeric.c#L3513 static VALUE int_downto_size(VALUE from, VALUE args) { - return num_interval_step_size(from, RARRAY_PTR(args)[0], INT2FIX(-1), FALSE); + return ruby_num_interval_step_size(from, RARRAY_PTR(args)[0], INT2FIX(-1), FALSE); } /* Index: internal.h =================================================================== --- internal.h (revision 39610) +++ internal.h (revision 39611) @@ -165,7 +165,7 @@ void Init_newline(void); https://github.com/ruby/ruby/blob/trunk/internal.h#L165 /* numeric.c */ int rb_num_to_uint(VALUE val, unsigned int *ret); -VALUE num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl); +VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl); int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl); double ruby_float_mod(double x, double y); int rb_num_negative_p(VALUE); @@ -331,8 +331,8 @@ void Init_prelude(void); https://github.com/ruby/ruby/blob/trunk/internal.h#L331 /* vm_backtrace.c */ void Init_vm_backtrace(void); -VALUE vm_thread_backtrace(int argc, VALUE *argv, VALUE thval); -VALUE vm_thread_backtrace_locations(int argc, VALUE *argv, VALUE thval); +VALUE rb_vm_thread_backtrace(int argc, VALUE *argv, VALUE thval); +VALUE rb_vm_thread_backtrace_locations(int argc, VALUE *argv, VALUE thval); VALUE rb_make_backtrace(void); void rb_backtrace_print_as_bugreport(void); Index: vm.c =================================================================== --- vm.c (revision 39610) +++ vm.c (revision 39611) @@ -1543,7 +1543,7 @@ vm_mark_each_thread_func(st_data_t key, https://github.com/ruby/ruby/blob/trunk/vm.c#L1543 return ST_CONTINUE; } -void vm_trace_mark_event_hooks(rb_hook_list_t *hooks); +void rb_vm_trace_mark_event_hooks(rb_hook_list_t *hooks); void rb_vm_mark(void *ptr) @@ -1574,7 +1574,7 @@ rb_vm_mark(void *ptr) https://github.com/ruby/ruby/blob/trunk/vm.c#L1574 rb_mark_tbl(vm->loading_table); } - vm_trace_mark_event_hooks(&vm->event_hooks); + rb_vm_trace_mark_event_hooks(&vm->event_hooks); for (i = 0; i < RUBY_NSIG; i++) { if (vm->trap_list[i].cmd) @@ -1845,7 +1845,7 @@ rb_thread_mark(void *ptr) https://github.com/ruby/ruby/blob/trunk/vm.c#L1845 sizeof(th->machine_regs) / sizeof(VALUE)); } - vm_trace_mark_event_hooks(&th->event_hooks); + rb_vm_trace_mark_event_hooks(&th->event_hooks); } RUBY_MARK_LEAVE("thread"); @@ -2609,9 +2609,9 @@ rb_ruby_debug_ptr(void) https://github.com/ruby/ruby/blob/trunk/vm.c#L2609 } /* iseq.c */ -VALUE insn_operand_intern(rb_iseq_t *iseq, - VALUE insn, int op_no, VALUE op, - int len, size_t pos, VALUE *pnop, VALUE child); +VALUE rb_insn_operand_intern(rb_iseq_t *iseq, + VALUE insn, int op_no, VALUE op, + int len, size_t pos, VALUE *pnop, VALUE child); #if VM_COLLECT_USAGE_DETAILS @@ -2693,7 +2693,7 @@ vm_analysis_operand(int insn, int n, VAL https://github.com/ruby/ruby/blob/trunk/vm.c#L2693 HASH_ASET(ihash, INT2FIX(n), ophash); } /* intern */ - valstr = insn_operand_intern(GET_THREAD()->cfp->iseq, insn, n, op, 0, 0, 0, 0); + valstr = rb_insn_operand_intern(GET_THREAD()->cfp->iseq, insn, n, op, 0, 0, 0, 0); /* set count */ if ((cv = rb_hash_aref(ophash, valstr)) == Qnil) { @@ -2806,7 +2806,7 @@ vm_collect_usage_operand(int insn, int n https://github.com/ruby/ruby/blob/trunk/vm.c#L2806 if (RUBY_DTRACE_INSN_OPERAND_ENABLED()) { VALUE valstr; - valstr = insn_operand_intern(GET_THREAD()->cfp->iseq, insn, n, op, 0, 0, 0, 0); + valstr = rb_insn_operand_intern(GET_THREAD()->cfp->iseq, insn, n, op, 0, 0, 0, 0); RUBY_DTRACE_INSN_OPERAND(RSTRING_PTR(valstr), rb_insns_name(insn)); RB_GC_GUARD(valstr); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/