summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2019-07-19 13:02:38 +0900
committerKoichi Sasada <ko1@atdot.net>2019-07-19 13:07:59 +0900
commit182ae1407b3f6597cdbf6872f788c1ed3aa22a35 (patch)
tree043184ff9daa64e4e3cea797226b84eed92b75b0 /include
parent547f574b639cd8586568ebb8570c51faf102c313 (diff)
fix shared array terminology.
Shared arrays created by Array#dup and so on points a shared_root object to manage lifetime of Array buffer. However, sometimes shared_root is called only shared so it is confusing. So I fixed these wording "shared" to "shared_root". * RArray::heap::aux::shared -> RArray::heap::aux::shared_root * ARY_SHARED() -> ARY_SHARED_ROOT() * ARY_SHARED_NUM() -> ARY_SHARED_ROOT_REFCNT() Also, add some debug_counters to count shared array objects. * ary_shared_create: shared ary by Array#dup and so on. * ary_shared: finished in shard. * ary_shared_root_occupied: shared_root but has only 1 refcnt. The number (ary_shared - ary_shared_root_occupied) is meaningful.
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 863102228b..c7ce5ba3bd 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1054,7 +1054,7 @@ struct RArray {
long len;
union {
long capa;
- VALUE shared;
+ VALUE shared_root;
} aux;
const VALUE *ptr;
} heap;