summaryrefslogtreecommitdiff
path: root/ext/objspace/object_tracing.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/objspace/object_tracing.c')
-rw-r--r--ext/objspace/object_tracing.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/ext/objspace/object_tracing.c b/ext/objspace/object_tracing.c
index 5fe1d757e5..b8fa3edf4d 100644
--- a/ext/objspace/object_tracing.c
+++ b/ext/objspace/object_tracing.c
@@ -15,6 +15,7 @@
#include "ruby/ruby.h"
#include "ruby/debug.h"
+#include "objspace.h"
size_t rb_gc_count(void); /* from gc.c */
@@ -28,20 +29,6 @@ struct traceobj_arg {
struct traceobj_arg *prev_traceobj_arg;
};
-/* all of information don't need marking. */
-struct allocation_info {
- int living;
- VALUE flags;
- VALUE klass;
-
- /* allocation info */
- const char *path;
- unsigned long line;
- const char *class_path;
- VALUE mid;
- size_t generation;
-};
-
static const char *
make_unique_str(st_table *tbl, const char *str, long len)
{
@@ -341,6 +328,12 @@ lookup_allocation_info(VALUE obj)
return NULL;
}
+struct allocation_info *
+objspace_lookup_allocation_info(VALUE obj)
+{
+ return lookup_allocation_info(obj);
+}
+
/*
* call-seq: allocation_sourcefile(object) -> string
*