summaryrefslogtreecommitdiff
path: root/internal/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'internal/hash.h')
-rw-r--r--internal/hash.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/hash.h b/internal/hash.h
index 3874abeaa5..fe859cb716 100644
--- a/internal/hash.h
+++ b/internal/hash.h
@@ -28,10 +28,6 @@ enum ruby_rhash_flags {
RHASH_AR_TABLE_BOUND_MASK = (FL_USER8|FL_USER9|FL_USER10|FL_USER11), /* FL 8..11 */
RHASH_AR_TABLE_BOUND_SHIFT = (FL_USHIFT+8),
-#if USE_TRANSIENT_HEAP
- RHASH_TRANSIENT_FLAG = FL_USER12, /* FL 12 */
-#endif
-
// we can not put it in "enum" because it can exceed "int" range.
#define RHASH_LEV_MASK (FL_USER13 | FL_USER14 | FL_USER15 | /* FL 13..19 */ \
FL_USER16 | FL_USER17 | FL_USER18 | FL_USER19)
@@ -91,6 +87,7 @@ int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval);
int rb_hash_stlike_foreach_with_replace(VALUE hash, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func *func, st_data_t arg);
VALUE rb_ident_hash_new_with_size(st_index_t size);
+void rb_hash_free(VALUE hash);
static inline unsigned RHASH_AR_TABLE_SIZE_RAW(VALUE h);
static inline VALUE RHASH_IFNONE(VALUE h);
@@ -128,12 +125,14 @@ RHASH_AR_TABLE_P(VALUE h)
return ! FL_TEST_RAW(h, RHASH_ST_TABLE_FLAG);
}
+RBIMPL_ATTR_RETURNS_NONNULL()
static inline struct ar_table_struct *
RHASH_AR_TABLE(VALUE h)
{
return (struct ar_table_struct *)((uintptr_t)h + sizeof(struct RHash));
}
+RBIMPL_ATTR_RETURNS_NONNULL()
static inline st_table *
RHASH_ST_TABLE(VALUE h)
{