mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fix for ansi-pedantic compile option.
* iseq.c (iseq_add_local_tracepoint_i): extract aggregate initialization. See https://travis-ci.org/ruby/ruby/jobs/459881277 * iseq.c (iseq_remove_local_tracepoint_i): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f6fea2b227
commit
d35bfdac74
1 changed files with 9 additions and 2 deletions
11
iseq.c
11
iseq.c
|
@ -3024,7 +3024,11 @@ iseq_add_local_tracepoint_i(const rb_iseq_t *iseq, void *p)
|
||||||
int
|
int
|
||||||
rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval)
|
rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval)
|
||||||
{
|
{
|
||||||
struct trace_set_local_events_struct data = {turnon_events, tpval, 0};
|
struct trace_set_local_events_struct data;
|
||||||
|
data.turnon_events = turnon_events;
|
||||||
|
data.tpval = tpval;
|
||||||
|
data.n = 0;
|
||||||
|
|
||||||
iseq_add_local_tracepoint_i(iseq, (void *)&data);
|
iseq_add_local_tracepoint_i(iseq, (void *)&data);
|
||||||
if (0) rb_funcall(Qnil, rb_intern("puts"), 1, rb_iseq_disasm(iseq)); /* for debug */
|
if (0) rb_funcall(Qnil, rb_intern("puts"), 1, rb_iseq_disasm(iseq)); /* for debug */
|
||||||
return data.n;
|
return data.n;
|
||||||
|
@ -3075,7 +3079,10 @@ iseq_remove_local_tracepoint_i(const rb_iseq_t *iseq, void *p)
|
||||||
int
|
int
|
||||||
rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval)
|
rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval)
|
||||||
{
|
{
|
||||||
struct trace_clear_local_events_struct data = {tpval, 0};
|
struct trace_clear_local_events_struct data;
|
||||||
|
data.tpval = tpval;
|
||||||
|
data.n = 0;
|
||||||
|
|
||||||
iseq_remove_local_tracepoint_i(iseq, (void *)&data);
|
iseq_remove_local_tracepoint_i(iseq, (void *)&data);
|
||||||
return data.n;
|
return data.n;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue