summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-29 05:32:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-29 05:32:57 +0000
commit645116ff25e42b1cfb065ad98e13818c8c5c2a8d (patch)
tree47ed734b95ca72ec176b056b766a0561ef441723 /hash.c
parent1be5cb6371048a35d9fb2859ca8a865e982608cf (diff)
RUBY_DTRACE_CREATE_HOOK
* internal.h (RUBY_DTRACE_CREATE_HOOK): macro to call hook at object creation. * vm.c (rb_source_location, rb_source_loc): retrieve source path and line number at once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hash.c b/hash.c
index ae1051d618..ea78018a3a 100644
--- a/hash.c
+++ b/hash.c
@@ -381,9 +381,7 @@ hash_alloc(VALUE klass)
static VALUE
empty_hash_alloc(VALUE klass)
{
- if (RUBY_DTRACE_HASH_CREATE_ENABLED()) {
- RUBY_DTRACE_HASH_CREATE(0, rb_sourcefile(), rb_sourceline());
- }
+ RUBY_DTRACE_CREATE_HOOK(HASH, 0);
return hash_alloc(klass);
}