mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/objspace/object_tracing.c: rename allocation_info to
lookup_allocation_info. At times I confused "struct allocation_info" with "function allocation_info". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
15d26c3fd9
commit
fbece268c7
2 changed files with 12 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Thu Jun 6 14:16:37 2013 Narihiro Nakamura <authornari@gmail.com>
|
||||||
|
|
||||||
|
* ext/objspace/object_tracing.c: rename allocation_info to
|
||||||
|
lookup_allocation_info. At times I confused "struct
|
||||||
|
allocation_info" with "function allocation_info".
|
||||||
|
|
||||||
Thu Jun 6 13:57:06 2013 Narihiro Nakamura <authornari@gmail.com>
|
Thu Jun 6 13:57:06 2013 Narihiro Nakamura <authornari@gmail.com>
|
||||||
|
|
||||||
* ext/objspace/object_tracing.c: allocation_info function isn't
|
* ext/objspace/object_tracing.c: allocation_info function isn't
|
||||||
|
|
|
@ -164,7 +164,7 @@ trace_object_allocations(VALUE objspace)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct allocation_info *
|
static struct allocation_info *
|
||||||
allocation_info(VALUE obj)
|
lookup_allocation_info(VALUE obj)
|
||||||
{
|
{
|
||||||
if (traceobj_arg) {
|
if (traceobj_arg) {
|
||||||
struct allocation_info *info;
|
struct allocation_info *info;
|
||||||
|
@ -178,7 +178,7 @@ allocation_info(VALUE obj)
|
||||||
static VALUE
|
static VALUE
|
||||||
allocation_sourcefile(VALUE objspace, VALUE obj)
|
allocation_sourcefile(VALUE objspace, VALUE obj)
|
||||||
{
|
{
|
||||||
struct allocation_info *info = allocation_info(obj);
|
struct allocation_info *info = lookup_allocation_info(obj);
|
||||||
if (info) {
|
if (info) {
|
||||||
return info->path ? rb_str_new2(info->path) : Qnil;
|
return info->path ? rb_str_new2(info->path) : Qnil;
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ allocation_sourcefile(VALUE objspace, VALUE obj)
|
||||||
static VALUE
|
static VALUE
|
||||||
allocation_sourceline(VALUE objspace, VALUE obj)
|
allocation_sourceline(VALUE objspace, VALUE obj)
|
||||||
{
|
{
|
||||||
struct allocation_info *info = allocation_info(obj);
|
struct allocation_info *info = lookup_allocation_info(obj);
|
||||||
if (info) {
|
if (info) {
|
||||||
return INT2FIX(info->line);
|
return INT2FIX(info->line);
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ allocation_sourceline(VALUE objspace, VALUE obj)
|
||||||
static VALUE
|
static VALUE
|
||||||
allocation_class_path(VALUE objspace, VALUE obj)
|
allocation_class_path(VALUE objspace, VALUE obj)
|
||||||
{
|
{
|
||||||
struct allocation_info *info = allocation_info(obj);
|
struct allocation_info *info = lookup_allocation_info(obj);
|
||||||
if (info) {
|
if (info) {
|
||||||
return info->class_path ? rb_str_new2(info->class_path) : Qnil;
|
return info->class_path ? rb_str_new2(info->class_path) : Qnil;
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,7 @@ allocation_class_path(VALUE objspace, VALUE obj)
|
||||||
static VALUE
|
static VALUE
|
||||||
allocation_method_id(VALUE objspace, VALUE obj)
|
allocation_method_id(VALUE objspace, VALUE obj)
|
||||||
{
|
{
|
||||||
struct allocation_info *info = allocation_info(obj);
|
struct allocation_info *info = lookup_allocation_info(obj);
|
||||||
if (info) {
|
if (info) {
|
||||||
return info->mid;
|
return info->mid;
|
||||||
}
|
}
|
||||||
|
@ -226,7 +226,7 @@ allocation_method_id(VALUE objspace, VALUE obj)
|
||||||
static VALUE
|
static VALUE
|
||||||
allocation_generation(VALUE objspace, VALUE obj)
|
allocation_generation(VALUE objspace, VALUE obj)
|
||||||
{
|
{
|
||||||
struct allocation_info *info = allocation_info(obj);
|
struct allocation_info *info = lookup_allocation_info(obj);
|
||||||
if (info) {
|
if (info) {
|
||||||
return SIZET2NUM(info->generation);
|
return SIZET2NUM(info->generation);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue