Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Detect and work on ruby 1.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Jan 24, 2011
1 parent ad1035b commit 1021c9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/perftools.c
Expand Up @@ -339,7 +339,7 @@ uc_get_ip(ucontext_t *uc) {
return (char**)&uc->program_counter;
}

#ifdef RB_EVENT_HOOKS_HAVE_CALLBACK_DATA
#if defined(RB_EVENT_HOOKS_HAVE_CALLBACK_DATA) || defined(RUBY_EVENT_VM)
static void
event_handler(rb_event_flag_t event, VALUE data, VALUE self, ID id, VALUE klass) {
ProfilerRecord(0, NULL, NULL);
Expand All @@ -357,7 +357,7 @@ methprofiler_setup()
if (bMethProfilerRunning)
return Qtrue;

#ifdef RB_EVENT_HOOKS_HAVE_CALLBACK_DATA
#if defined(RB_EVENT_HOOKS_HAVE_CALLBACK_DATA) || defined(RUBY_EVENT_VM)
rb_add_event_hook(event_handler, RUBY_EVENT_CALL|RUBY_EVENT_C_CALL, 0);
#else
rb_add_event_hook(event_handler, RUBY_EVENT_CALL|RUBY_EVENT_C_CALL);
Expand Down

0 comments on commit 1021c9d

Please sign in to comment.