mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4f59a115fd
commit
2d1c94a18d
9 changed files with 34 additions and 34 deletions
|
@ -165,7 +165,7 @@ void Init_newline(void);
|
|||
|
||||
/* 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);
|
|||
|
||||
/* 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);
|
||||
|
|
4
iseq.c
4
iseq.c
|
@ -1119,7 +1119,7 @@ id_to_name(ID id, VALUE default_value)
|
|||
}
|
||||
|
||||
VALUE
|
||||
insn_operand_intern(rb_iseq_t *iseq,
|
||||
rb_insn_operand_intern(rb_iseq_t *iseq,
|
||||
VALUE insn, int op_no, VALUE op,
|
||||
int len, size_t pos, VALUE *pnop, VALUE child)
|
||||
{
|
||||
|
@ -1268,7 +1268,7 @@ rb_iseq_disasm_insn(VALUE ret, VALUE *iseq, size_t pos,
|
|||
|
||||
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],
|
||||
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);
|
||||
|
|
|
@ -1811,7 +1811,7 @@ ruby_float_step(VALUE from, VALUE to, VALUE step, int excl)
|
|||
}
|
||||
|
||||
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)
|
|||
{
|
||||
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)
|
|||
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)
|
|||
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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
4
range.c
4
range.c
|
@ -340,7 +340,7 @@ range_step_size(VALUE range, VALUE args)
|
|||
}
|
||||
|
||||
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)
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
4
thread.c
4
thread.c
|
@ -4904,7 +4904,7 @@ rb_exec_recursive_outer(VALUE (*func) (VALUE, VALUE, int), VALUE obj, VALUE arg)
|
|||
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 *argv, VALUE thval)
|
|||
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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
12
vm.c
12
vm.c
|
@ -1543,7 +1543,7 @@ vm_mark_each_thread_func(st_data_t key, st_data_t value, st_data_t dummy)
|
|||
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)
|
|||
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)
|
|||
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,7 +2609,7 @@ rb_ruby_debug_ptr(void)
|
|||
}
|
||||
|
||||
/* iseq.c */
|
||||
VALUE insn_operand_intern(rb_iseq_t *iseq,
|
||||
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);
|
||||
|
||||
|
@ -2693,7 +2693,7 @@ vm_analysis_operand(int insn, int n, VALUE op)
|
|||
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, VALUE op)
|
|||
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);
|
||||
|
|
|
@ -629,13 +629,13 @@ backtrace_load_data(VALUE self, VALUE str)
|
|||
}
|
||||
|
||||
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)
|
|||
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 *argv, VALUE thval, int to_str)
|
|||
}
|
||||
|
||||
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_inspector_func_t func, void *data)
|
|||
|
||||
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);
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ static void vm_set_eval_stack(rb_thread_t * th, VALUE iseqval, const NODE *cref,
|
|||
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 src, VALUE scope, NODE *cref, const char
|
|||
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);
|
||||
|
|
|
@ -48,7 +48,7 @@ static int ruby_event_flag_count[MAX_EVENT_NUM] = {0};
|
|||
/* 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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue