ruby-changes:71877
From: Nobuyoshi <ko1@a...>
Date: Thu, 19 May 2022 17:04:12 +0900 (JST)
Subject: [ruby-changes:71877] 72fc3b1bbb (master): Fold too long lines, etc [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=72fc3b1bbb From 72fc3b1bbbbc429845dddce70f9c5e9eb9762cee Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 19 May 2022 16:45:37 +0900 Subject: Fold too long lines, etc [ci skip] --- variable.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/variable.c b/variable.c index 23dc5f18e8..f7d9f1c61e 100644 --- a/variable.c +++ b/variable.c @@ -2299,7 +2299,8 @@ autoload_feature_lookup_or_create(VALUE feature, struct autoload_data **autoload https://github.com/ruby/ruby/blob/trunk/variable.c#L2299 if (autoload_data_pointer) *autoload_data_pointer = autoload_data; rb_hash_aset(autoload_features, feature, autoload_data_value); - } else if (autoload_data_pointer) { + } + else if (autoload_data_pointer) { *autoload_data_pointer = rb_check_typeddata(autoload_data_value, &autoload_data_type); } @@ -2323,7 +2324,9 @@ autoload_feature_clear_if_empty(VALUE argument) https://github.com/ruby/ruby/blob/trunk/variable.c#L2324 } #endif -static struct st_table* autoload_table_lookup_or_create(VALUE module) { +static struct st_table * +autoload_table_lookup_or_create(VALUE module) +{ // Get or create an autoload table in the class instance variables: struct st_table *table = RCLASS_IV_TBL(module); VALUE autoload_table_value; @@ -2654,7 +2657,9 @@ autoload_apply_constants(VALUE _arguments) https://github.com/ruby/ruby/blob/trunk/variable.c#L2657 struct autoload_const *autoload_const; struct autoload_const *next; - // We use safe iteration here because `autoload_const_set` will eventually invoke `autoload_delete` which will remove the constant from the linked list. In theory, once the `autoload_data->constants` linked list is empty, we can remove it. + // We use safe iteration here because `autoload_const_set` will eventually invoke + // `autoload_delete` which will remove the constant from the linked list. In theory, once + // the `autoload_data->constants` linked list is empty, we can remove it. // Iterate over all constants and assign them: ccan_list_for_each_safe(&arguments->autoload_data->constants, autoload_const, next, cnode) { @@ -2680,7 +2685,10 @@ autoload_try_load(VALUE _arguments) https://github.com/ruby/ruby/blob/trunk/variable.c#L2685 { struct autoload_load_arguments *arguments = (struct autoload_load_arguments*)_arguments; - // We have tried to require the autoload feature, so we shouldn't bother trying again in any other threads. More specifically, `arguments->result` starts of as nil, but then contains the result of `require` which is either true or false. Provided it's not nil, it means some other thread has got as far as evaluating the require statement completely. + // We have tried to require the autoload feature, so we shouldn't bother trying again in any + // other threads. More specifically, `arguments->result` starts of as nil, but then contains the + // result of `require` which is either true or false. Provided it's not nil, it means some other + // thread has got as far as evaluating the require statement completely. if (arguments->result != Qnil) return arguments->result; // Try to require the autoload feature: @@ -2694,7 +2702,8 @@ autoload_try_load(VALUE _arguments) https://github.com/ruby/ruby/blob/trunk/variable.c#L2702 arguments->result = Qfalse; rb_const_remove(arguments->module, arguments->name); - } else { + } + else { // Otherwise, it was loaded, copy the flags from the autoload constant: ce->flag |= arguments->flag; } -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/