From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6315 166.70.0.0/16 X-Spam-Status: No, score=-1.8 required=3.0 tests=AWL,BAYES_00,RCVD_IN_XBL, RDNS_NONE shortcircuit=no autolearn=no version=3.3.2 X-Original-To: spew@80x24.org Received: from 80x24.org (unknown [166.70.181.109]) by dcvr.yhbt.net (Postfix) with ESMTP id CE7121F44D for ; Thu, 13 Aug 2015 21:40:38 +0000 (UTC) From: Eric Wong To: spew@80x24.org Subject: [PATCH 1/2] iseq.c (rb_iseq_mark): reduce NULL checks Date: Thu, 13 Aug 2015 21:40:33 +0000 Message-Id: <1439502034-1546-1-git-send-email-e@80x24.org> List-Id: iseq_location_setup always sets path, label and base_label fields, and the only caller of iseq_location_setup (prepare_iseq_build) will always pass non-nil `name' and `path' arguments. --- iseq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iseq.c b/iseq.c index e9b84a1..9b32c0a 100644 --- a/iseq.c +++ b/iseq.c @@ -108,9 +108,9 @@ rb_iseq_mark(const rb_iseq_t *iseq) const struct rb_iseq_constant_body *body = iseq->body; RUBY_MARK_UNLESS_NULL(body->mark_ary); - RUBY_MARK_UNLESS_NULL(body->location.label); - RUBY_MARK_UNLESS_NULL(body->location.base_label); - RUBY_MARK_UNLESS_NULL(body->location.path); + rb_gc_mark(body->location.label); + rb_gc_mark(body->location.base_label); + rb_gc_mark(body->location.path); RUBY_MARK_UNLESS_NULL(body->location.absolute_path); } -- EW