mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
d627b75e01
commit
c57610dcd5
Notes:
git
2021-06-01 17:01:05 +09:00
Merged-By: k0kubun <takashikkbn@gmail.com>
1 changed files with 5 additions and 5 deletions
10
hash.c
10
hash.c
|
@ -2547,7 +2547,7 @@ rb_hash_delete_if(VALUE hash)
|
||||||
* e.each {|key, value| key.start_with?('b') } # => {:foo=>0}
|
* e.each {|key, value| key.start_with?('b') } # => {:foo=>0}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VALUE
|
static VALUE
|
||||||
rb_hash_reject_bang(VALUE hash)
|
rb_hash_reject_bang(VALUE hash)
|
||||||
{
|
{
|
||||||
st_index_t n;
|
st_index_t n;
|
||||||
|
@ -2579,7 +2579,7 @@ rb_hash_reject_bang(VALUE hash)
|
||||||
* h1 # => {:foo=>0}
|
* h1 # => {:foo=>0}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VALUE
|
static VALUE
|
||||||
rb_hash_reject(VALUE hash)
|
rb_hash_reject(VALUE hash)
|
||||||
{
|
{
|
||||||
VALUE result;
|
VALUE result;
|
||||||
|
@ -2671,7 +2671,7 @@ rb_hash_except(int argc, VALUE *argv, VALUE hash)
|
||||||
* h.values_at(:hello, :foo) # => [nil, 0]
|
* h.values_at(:hello, :foo) # => [nil, 0]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VALUE
|
static VALUE
|
||||||
rb_hash_values_at(int argc, VALUE *argv, VALUE hash)
|
rb_hash_values_at(int argc, VALUE *argv, VALUE hash)
|
||||||
{
|
{
|
||||||
VALUE result = rb_ary_new2(argc);
|
VALUE result = rb_ary_new2(argc);
|
||||||
|
@ -4149,7 +4149,7 @@ assoc_i(VALUE key, VALUE val, VALUE arg)
|
||||||
* Returns +nil+ if key +key+ is not found.
|
* Returns +nil+ if key +key+ is not found.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VALUE
|
static VALUE
|
||||||
rb_hash_assoc(VALUE hash, VALUE key)
|
rb_hash_assoc(VALUE hash, VALUE key)
|
||||||
{
|
{
|
||||||
st_table *table;
|
st_table *table;
|
||||||
|
@ -4210,7 +4210,7 @@ rassoc_i(VALUE key, VALUE val, VALUE arg)
|
||||||
* Returns +nil+ if no such value found.
|
* Returns +nil+ if no such value found.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VALUE
|
static VALUE
|
||||||
rb_hash_rassoc(VALUE hash, VALUE obj)
|
rb_hash_rassoc(VALUE hash, VALUE obj)
|
||||||
{
|
{
|
||||||
VALUE args[2];
|
VALUE args[2];
|
||||||
|
|
Loading…
Reference in a new issue