[前][次][番号順一覧][スレッド一覧]

ruby-changes:56598

From: git <ko1@a...>
Date: Fri, 19 Jul 2019 13:10:25 +0900 (JST)
Subject: [ruby-changes:56598] git: a44ad9a145 (master): * expand tabs.

https://git.ruby-lang.org/ruby.git/commit/?id=a44ad9a145

From a44ad9a1451eb86385339cfd72713ff764f1c820 Mon Sep 17 00:00:00 2001
From: git <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Fri, 19 Jul 2019 13:10:08 +0900
Subject: * expand tabs.


diff --git a/array.c b/array.c
index a84361f..f46bc55 100644
--- a/array.c
+++ b/array.c
@@ -472,13 +472,13 @@ static void https://github.com/ruby/ruby/blob/trunk/array.c#L472
 rb_ary_decrement_share(VALUE shared_root)
 {
     if (shared_root) {
-	long num = ARY_SHARED_ROOT_REFCNT(shared_root) - 1;
+        long num = ARY_SHARED_ROOT_REFCNT(shared_root) - 1;
 	if (num == 0) {
-	    rb_ary_free(shared_root);
-	    rb_gc_force_recycle(shared_root);
+            rb_ary_free(shared_root);
+            rb_gc_force_recycle(shared_root);
 	}
 	else if (num > 0) {
-	    ARY_SET_SHARED_ROOT_REFCNT(shared_root, num);
+            ARY_SET_SHARED_ROOT_REFCNT(shared_root, num);
 	}
     }
 }
@@ -504,7 +504,7 @@ rb_ary_increment_share(VALUE shared_root) https://github.com/ruby/ruby/blob/trunk/array.c#L504
 {
     long num = ARY_SHARED_ROOT_REFCNT(shared_root);
     if (num >= 0) {
-	ARY_SET_SHARED_ROOT_REFCNT(shared_root, num + 1);
+        ARY_SET_SHARED_ROOT_REFCNT(shared_root, num + 1);
     }
     return shared_root;
 }
@@ -531,7 +531,7 @@ rb_ary_modify(VALUE ary) https://github.com/ruby/ruby/blob/trunk/array.c#L531
     rb_ary_modify_check(ary);
     if (ARY_SHARED_P(ary)) {
 	long shared_len, len = RARRAY_LEN(ary);
-	VALUE shared_root = ARY_SHARED_ROOT(ary);
+        VALUE shared_root = ARY_SHARED_ROOT(ary);
 
         ary_verify(shared_root);
 
@@ -543,7 +543,7 @@ rb_ary_modify(VALUE ary) https://github.com/ruby/ruby/blob/trunk/array.c#L543
             rb_ary_decrement_share(shared_root);
             ARY_SET_EMBED_LEN(ary, len);
         }
-	else if (ARY_SHARED_ROOT_OCCUPIED(shared_root) && len > ((shared_len = RARRAY_LEN(shared_root))>>1)) {
+        else if (ARY_SHARED_ROOT_OCCUPIED(shared_root) && len > ((shared_len = RARRAY_LEN(shared_root))>>1)) {
             long shift = RARRAY_CONST_PTR_TRANSIENT(ary) - RARRAY_CONST_PTR_TRANSIENT(shared_root);
 	    FL_UNSET_SHARED(ary);
             ARY_SET_PTR(ary, RARRAY_CONST_PTR_TRANSIENT(shared_root));
@@ -551,8 +551,8 @@ rb_ary_modify(VALUE ary) https://github.com/ruby/ruby/blob/trunk/array.c#L551
             RARRAY_PTR_USE_TRANSIENT(ary, ptr, {
 		MEMMOVE(ptr, ptr+shift, VALUE, len);
 	    });
-	    FL_SET_EMBED(shared_root);
-	    rb_ary_decrement_share(shared_root);
+            FL_SET_EMBED(shared_root);
+            rb_ary_decrement_share(shared_root);
 	}
         else {
             VALUE *ptr = ary_heap_alloc(ary, len);
@@ -579,8 +579,8 @@ ary_ensure_room_for_push(VALUE ary, long add_len) https://github.com/ruby/ruby/blob/trunk/array.c#L579
     }
     if (ARY_SHARED_P(ary)) {
 	if (new_len > RARRAY_EMBED_LEN_MAX) {
-	    VALUE shared_root = ARY_SHARED_ROOT(ary);
-	    if (ARY_SHARED_ROOT_OCCUPIED(shared_root)) {
+            VALUE shared_root = ARY_SHARED_ROOT(ary);
+            if (ARY_SHARED_ROOT_OCCUPIED(shared_root)) {
                 if (ARY_HEAP_PTR(ary) - RARRAY_CONST_PTR_TRANSIENT(shared_root) + new_len <= RARRAY_LEN(shared_root)) {
 		    rb_ary_modify_check(ary);
 
@@ -643,7 +643,7 @@ rb_ary_shared_with_p(VALUE ary1, VALUE ary2) https://github.com/ruby/ruby/blob/trunk/array.c#L643
 {
     if (!ARY_EMBED_P(ary1) && ARY_SHARED_P(ary1) &&
 	!ARY_EMBED_P(ary2) && ARY_SHARED_P(ary2) &&
-	RARRAY(ary1)->as.heap.aux.shared_root == RARRAY(ary2)->as.heap.aux.shared_root &&
+        RARRAY(ary1)->as.heap.aux.shared_root == RARRAY(ary2)->as.heap.aux.shared_root &&
 	RARRAY(ary1)->as.heap.len == RARRAY(ary2)->as.heap.len) {
 	return Qtrue;
     }
@@ -822,7 +822,7 @@ ary_make_shared(VALUE ary) https://github.com/ruby/ruby/blob/trunk/array.c#L822
         rb_ary_transient_heap_evacuate(ary, TRUE);
 	ary_shrink_capa(ary);
 	FL_SET_SHARED_ROOT(ary);
-	ARY_SET_SHARED_ROOT_REFCNT(ary, 1);
+        ARY_SET_SHARED_ROOT_REFCNT(ary, 1);
 	return ary;
     }
     else {
@@ -1347,7 +1347,7 @@ rb_ary_behead(VALUE ary, long n) https://github.com/ruby/ruby/blob/trunk/array.c#L1347
 
     rb_ary_modify_check(ary);
     if (ARY_SHARED_P(ary)) {
-	if (ARY_SHARED_ROOT_OCCUPIED(ARY_SHARED_ROOT(ary))) {
+        if (ARY_SHARED_ROOT_OCCUPIED(ARY_SHARED_ROOT(ary))) {
 	  setup_occupied_shared:
 	    ary_mem_clear(ary, 0, n);
 	}
@@ -1383,9 +1383,9 @@ ary_ensure_room_for_unshift(VALUE ary, int argc) https://github.com/ruby/ruby/blob/trunk/array.c#L1383
     }
 
     if (ARY_SHARED_P(ary)) {
-	VALUE shared_root = ARY_SHARED_ROOT(ary);
-	capa = RARRAY_LEN(shared_root);
-	if (ARY_SHARED_ROOT_OCCUPIED(shared_root) && capa > new_len) {
+        VALUE shared_root = ARY_SHARED_ROOT(ary);
+        capa = RARRAY_LEN(shared_root);
+        if (ARY_SHARED_ROOT_OCCUPIED(shared_root) && capa > new_len) {
             rb_ary_modify_check(ary);
             head = RARRAY_CONST_PTR_TRANSIENT(ary);
             sharedp = RARRAY_CONST_PTR_TRANSIENT(shared_root);
@@ -1419,10 +1419,10 @@ ary_ensure_room_for_unshift(VALUE ary, int argc) https://github.com/ruby/ruby/blob/trunk/array.c#L1419
 	    head = sharedp + argc + room;
 	}
 	ARY_SET_PTR(ary, head - argc);
-	assert(ARY_SHARED_ROOT_OCCUPIED(ARY_SHARED_ROOT(ary)));
+        assert(ARY_SHARED_ROOT_OCCUPIED(ARY_SHARED_ROOT(ary)));
 
         ary_verify(ary);
-	return ARY_SHARED_ROOT(ary);
+        return ARY_SHARED_ROOT(ary);
     }
     else {
 	/* sliding items */
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index c7ce5ba..af561ff 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1054,7 +1054,7 @@ struct RArray { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1054
 	    long len;
 	    union {
 		long capa;
-		VALUE shared_root;
+                VALUE shared_root;
 	    } aux;
 	    const VALUE *ptr;
 	} heap;
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]