summaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog4
-rw-r--r--ext/-test-/tracepoint/tracepoint.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 738ec2d..8027b7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Sep 22 20:35:38 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * ext/-test-/tracepoint/tracepoint.c (Init_tracepoint): prevent from GC.
+
Sun Sep 22 19:00:28 2013 Benoit Daloze <eregontp@gmail.com>
* benchmark/bm_app_answer.rb: revert r42990, benchmark scripts should
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);
+ }
}