ruby-changes:66393
From: S.H <ko1@a...>
Date: Tue, 1 Jun 2021 17:00:56 +0900 (JST)
Subject: [ruby-changes:66393] c57610dcd5 (master): Add static modifier to C function in hash.c (#3138)
https://git.ruby-lang.org/ruby.git/commit/?id=c57610dcd5 From c57610dcd5e1ffcea0414d515995d950036869b0 Mon Sep 17 00:00:00 2001 From: "S.H" <gamelinks007@g...> Date: Tue, 1 Jun 2021 17:00:45 +0900 Subject: Add static modifier to C function in hash.c (#3138) * add static modifier for rb_hash_reject_bang func * add static modifier for rb_hash_reject func * add static modifier for rb_hash_values_at func * add static modifier for rb_hash_assoc func * add static modifier for rb_hash_rassoc func --- hash.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hash.c b/hash.c index 9b98739..80cf54f 100644 --- a/hash.c +++ b/hash.c @@ -2547,7 +2547,7 @@ rb_hash_delete_if(VALUE hash) https://github.com/ruby/ruby/blob/trunk/hash.c#L2547 * e.each {|key, value| key.start_with?('b') } # => {:foo=>0} */ -VALUE +static VALUE rb_hash_reject_bang(VALUE hash) { st_index_t n; @@ -2579,7 +2579,7 @@ rb_hash_reject_bang(VALUE hash) https://github.com/ruby/ruby/blob/trunk/hash.c#L2579 * h1 # => {:foo=>0} */ -VALUE +static VALUE rb_hash_reject(VALUE hash) { VALUE result; @@ -2671,7 +2671,7 @@ rb_hash_except(int argc, VALUE *argv, VALUE hash) https://github.com/ruby/ruby/blob/trunk/hash.c#L2671 * h.values_at(:hello, :foo) # => [nil, 0] */ -VALUE +static VALUE rb_hash_values_at(int argc, VALUE *argv, VALUE hash) { VALUE result = rb_ary_new2(argc); @@ -4149,7 +4149,7 @@ assoc_i(VALUE key, VALUE val, VALUE arg) https://github.com/ruby/ruby/blob/trunk/hash.c#L4149 * Returns +nil+ if key +key+ is not found. */ -VALUE +static VALUE rb_hash_assoc(VALUE hash, VALUE key) { st_table *table; @@ -4210,7 +4210,7 @@ rassoc_i(VALUE key, VALUE val, VALUE arg) https://github.com/ruby/ruby/blob/trunk/hash.c#L4210 * Returns +nil+ if no such value found. */ -VALUE +static VALUE rb_hash_rassoc(VALUE hash, VALUE obj) { VALUE args[2]; -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/