summaryrefslogtreecommitdiff
path: root/probes_helper.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-11 03:37:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-11 03:37:19 +0000
commitb949447a495ee1438e6a483a20631ab855c7e68f (patch)
tree808379e7686f95b42384bfff55c8e61b37740ff0 /probes_helper.h
parent4a0cda64b2fb743b1cdcd00d2b57e452835d99e4 (diff)
downloadruby-b949447a495ee1438e6a483a20631ab855c7e68f.tar.gz
probes_helper.h: RUBY_DTRACE_HOOK
* probes_helper.h (RUBY_DTRACE_HOOK): surround with do..while. * vm.c (vm_exec): supply semicolon. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'probes_helper.h')
-rw-r--r--probes_helper.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/probes_helper.h b/probes_helper.h
index 91514b31ea..12a18dcb34 100644
--- a/probes_helper.h
+++ b/probes_helper.h
@@ -7,6 +7,7 @@
VALUE rb_class_path_no_cache(VALUE _klass);
#define RUBY_DTRACE_HOOK(name, th, klazz, id) \
+do { \
if (RUBY_DTRACE_##name##_ENABLED()) { \
VALUE _klass = (klazz); \
VALUE _id = (id); \
@@ -49,6 +50,7 @@ VALUE rb_class_path_no_cache(VALUE _klass);
} \
} \
} \
+} while (0)
#define RUBY_DTRACE_METHOD_ENTRY_HOOK(th, klass, id) \
RUBY_DTRACE_HOOK(METHOD_ENTRY, th, klass, id)