summaryrefslogtreecommitdiff
path: root/ext/-test-
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-22 11:37:08 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-22 11:37:08 +0000
commitd2f4e701f83dffbe53e55fce3e6acfe62bb73e9d (patch)
tree92a158297dc93539f0df27f25e697702f9e77baf /ext/-test-
parent3557a5f85ef47cbfdfd5e3a3d2719fd702927c12 (diff)
* ext/-test-/tracepoint/tracepoint.c (Init_tracepoint): prevent from GC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/-test-')
-rw-r--r--ext/-test-/tracepoint/tracepoint.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/-test-/tracepoint/tracepoint.c b/ext/-test-/tracepoint/tracepoint.c
index 6762248..f72f57c 100644
--- a/ext/-test-/tracepoint/tracepoint.c
+++ b/ext/-test-/tracepoint/tracepoint.c
@@ -69,6 +69,10 @@ tracepoint_track_objspace_events(VALUE self)
void
Init_tracepoint(void)
{
+ size_t i;
VALUE mBug = rb_define_module("Bug");
rb_define_module_function(mBug, "tracepoint_track_objspace_events", tracepoint_track_objspace_events, 0);
+ for (i=0; i<sizeof(objects)/sizeof(VALUE); i++) {
+ rb_global_variable(objects+i);
+ }
}