* ext/probeprofiler/probeprofiler.c: clean warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2cb9ebd55d
commit
0c57bf4b61
@ -1,3 +1,7 @@
|
|||||||
|
Sun Jun 10 18:37:13 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/probeprofiler/probeprofiler.c: clean warnings.
|
||||||
|
|
||||||
Sun Jun 10 18:32:24 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Jun 10 18:32:24 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* missing/isinf.c, missing/dup2.c, missing/strtod.c, missing/x68.c,
|
* missing/isinf.c, missing/dup2.c, missing/strtod.c, missing/x68.c,
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
#include <ruby/ruby.h>
|
#include <ruby/ruby.h>
|
||||||
#include <yarvcore.h>
|
#include <yarvcore.h>
|
||||||
|
|
||||||
|
VALUE rb_thread_current_status(rb_thread_t *);
|
||||||
|
void rb_add_event_hook(rb_event_hook_func_t, rb_event_flag_t, VALUE);
|
||||||
|
int rb_remove_event_hook(rb_event_hook_func_t);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hash_inc(VALUE data, VALUE key)
|
hash_inc(VALUE data, VALUE key)
|
||||||
{
|
{
|
||||||
VALUE num = INT2FIX(0);
|
VALUE num = INT2FIX(0);
|
||||||
|
|
||||||
if (num = rb_hash_aref(data, key)) {
|
if (RTEST(num = rb_hash_aref(data, key))) {
|
||||||
num = INT2FIX(FIX2INT(num) + 1);
|
num = INT2FIX(FIX2INT(num) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15,7 +19,7 @@ hash_inc(VALUE data, VALUE key)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
pprof_hook(rb_event_flag_t flag, VALUE data,
|
pprof_hook(rb_event_flag_t flag, VALUE data,
|
||||||
VALUE dmyid, VALUE dmyklass)
|
VALUE self, ID dmyid, VALUE dmyklass)
|
||||||
{
|
{
|
||||||
rb_thread_t *th = GET_THREAD();
|
rb_thread_t *th = GET_THREAD();
|
||||||
VALUE sig = rb_thread_current_status(th);
|
VALUE sig = rb_thread_current_status(th);
|
||||||
@ -43,13 +47,7 @@ pprof_stop(VALUE self)
|
|||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
void
|
||||||
hash_to_ary_i(VALUE key, VALUE value, VALUE ary)
|
|
||||||
{
|
|
||||||
rb_ary_push(ary, rb_ary_new3(2, value, key));
|
|
||||||
return ST_CONTINUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
Init_probeprofiler(void)
|
Init_probeprofiler(void)
|
||||||
{
|
{
|
||||||
VALUE mPProf;
|
VALUE mPProf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user