diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-15 08:29:22 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-15 08:29:22 +0000 |
commit | a0908cb41356f4384a3e9a199c14490a452080ef (patch) | |
tree | d39f8594878553632d951423d22bc2542d4ffd06 /proc.c | |
parent | 28c42b4c25c48f65cd559018678a5cf34d387c24 (diff) |
remove redundant NULL check in mark functions
gc.c (gc_mark_children)only calls mark_func if the T_DATA ptr is
non-NULL, so avoid redundantly checking for that in each
mark function.
* iseq.c (iseq_mark): remove check for data pointer
* proc.c (binding_mark): ditto
* vm.c (rb_thread_mark): ditto
* vm_trace.c (tp_mark): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -243,13 +243,13 @@ binding_free(void *ptr) static void binding_mark(void *ptr) { - rb_binding_t *bind; + rb_binding_t *bind = ptr; + RUBY_MARK_ENTER("binding"); - if (ptr) { - bind = ptr; - RUBY_MARK_UNLESS_NULL(bind->env); - RUBY_MARK_UNLESS_NULL(bind->path); - } + + RUBY_MARK_UNLESS_NULL(bind->env); + RUBY_MARK_UNLESS_NULL(bind->path); + RUBY_MARK_LEAVE("binding"); } |