ruby-changes:70232
From: Nobuyoshi <ko1@a...>
Date: Wed, 15 Dec 2021 15:05:04 +0900 (JST)
Subject: [ruby-changes:70232] a6ebc10532 (master): Fixed env_pairs array types
https://git.ruby-lang.org/ruby.git/commit/?id=a6ebc10532 From a6ebc10532db1470372fd89a0ce48b822d25bd01 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 21 Jul 2021 12:57:32 +0900 Subject: Fixed env_pairs array types --- hash.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hash.c b/hash.c index 32a258e7331..22300ed85d6 100644 --- a/hash.c +++ b/hash.c @@ -5381,7 +5381,7 @@ env_entry_count(void) https://github.com/ruby/ruby/blob/trunk/hash.c#L5381 } static void -copy_env_pairs(VALUE arr[], int size) +copy_env_pairs(const char **arr, int size) { char **env; env = GET_ENVIRON(environ); @@ -5402,7 +5402,7 @@ env_keys(int raw) https://github.com/ruby/ruby/blob/trunk/hash.c#L5402 ary = rb_ary_new(); rb_native_mutex_lock(&env_lock); int pair_count = env_entry_count(); - VALUE env_pairs[pair_count]; + const char *env_pairs[pair_count]; copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); @@ -5495,7 +5495,7 @@ env_values(void) https://github.com/ruby/ruby/blob/trunk/hash.c#L5495 ary = rb_ary_new(); rb_native_mutex_lock(&env_lock); int pair_count = env_entry_count(); - VALUE env_pairs[pair_count]; + const char *env_pairs[pair_count]; copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); @@ -5588,7 +5588,7 @@ env_each_pair(VALUE ehash) https://github.com/ruby/ruby/blob/trunk/hash.c#L5588 ary = rb_ary_new(); rb_native_mutex_lock(&env_lock); int pair_count = env_entry_count(); - VALUE env_pairs[pair_count]; + const char *env_pairs[pair_count]; copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); @@ -5945,7 +5945,7 @@ env_inspect(VALUE _) https://github.com/ruby/ruby/blob/trunk/hash.c#L5945 str = rb_str_buf_new2("{"); rb_native_mutex_lock(&env_lock); int pair_count = env_entry_count(); - VALUE env_pairs[pair_count]; + const char *env_pairs[pair_count]; copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); @@ -5987,7 +5987,7 @@ env_to_a(VALUE _) https://github.com/ruby/ruby/blob/trunk/hash.c#L5987 ary = rb_ary_new(); rb_native_mutex_lock(&env_lock); int pair_count = env_entry_count(); - VALUE env_pairs[pair_count]; + const char *env_pairs[pair_count]; copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); @@ -6232,7 +6232,7 @@ env_key(VALUE dmy, VALUE value) https://github.com/ruby/ruby/blob/trunk/hash.c#L6232 SafeStringValue(value); rb_native_mutex_lock(&env_lock); int pair_count = env_entry_count(); - VALUE env_pairs[pair_count]; + const char *env_pairs[pair_count]; copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); @@ -6260,7 +6260,7 @@ env_to_hash(void) https://github.com/ruby/ruby/blob/trunk/hash.c#L6260 hash = rb_hash_new(); rb_native_mutex_lock(&env_lock); int pair_count = env_entry_count(); - VALUE env_pairs[pair_count]; + const char *env_pairs[pair_count]; copy_env_pairs(env_pairs, pair_count); rb_native_mutex_unlock(&env_lock); -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/