summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-29 16:29:44 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-29 16:29:44 +0000
commit8ee0a8e91a2dfcde0381949348268961b0f81393 (patch)
treea7d361acfbdf128d75cb67b8eb42f2f0b49bdfea /internal.h
parent9f3585afad86f7683fec377a0eb4bb53b8165529 (diff)
hide ar_table internals from internal.h.
* internal.h: move ar_table def to hash.c because other files don't need to know implementation of ar_table. * hash.c (rb_hash_ar_table_size): added because gc.c needs to know the size_of(ar_table). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h24
1 files changed, 1 insertions, 23 deletions
diff --git a/internal.h b/internal.h
index 433ab6635d..9d90c191f2 100644
--- a/internal.h
+++ b/internal.h
@@ -810,33 +810,11 @@ void rb_hash_st_table_set(VALUE hash, st_table *st);
#define RHASH_UNSET_TRANSIENT_FLAG(h) ((void)0)
#endif
-#define RHASH_AR_TABLE_MAX_SIZE 8
-#define RHASH_AR_TABLE_MAX_BOUND RHASH_AR_TABLE_MAX_SIZE
-
-typedef struct ar_table_entry {
- VALUE hash;
- VALUE key;
- VALUE record;
-} ar_table_entry;
-
-typedef struct ar_table_struct {
- ar_table_entry entries[RHASH_AR_TABLE_MAX_SIZE];
-} ar_table;
-
-/*
- * RHASH_AR_TABLE_P(h):
- * * as.ar == NULL or
- * as.ar points ar_table.
- * * as.ar is allocated by transient heap or xmalloc.
- *
- * !RHASH_AR_TABLE_P(h):
- * * as.st points st_table.
- */
struct RHash {
struct RBasic basic;
union {
st_table *st;
- ar_table *ar; /* possibly 0 */
+ struct ar_table_struct *ar; /* possibly 0 */
} as;
int iter_lev;
const VALUE ifnone;