summaryrefslogtreecommitdiff
path: root/internal/hash.h
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2023-06-23 14:54:50 +0900
committerGitHub <[email protected]>2023-06-23 14:54:50 +0900
commit73529a12bbf5bb88b2596ca1169bd29dc75aa2e6 (patch)
tree2286fc3c47dbe1593e5c5465d8c4681e0b75308b /internal/hash.h
parent00c1bd66d6fa24bd50bd3f20334ec162d0279f40 (diff)
Declare `RHASH_AR_TABLE` and `RHASH_ST_TABLE` return non-null
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7976 Merged-By: nobu <[email protected]>
Diffstat (limited to 'internal/hash.h')
-rw-r--r--internal/hash.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/hash.h b/internal/hash.h
index c0baaa9dc9..d1848e5408 100644
--- a/internal/hash.h
+++ b/internal/hash.h
@@ -124,12 +124,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)
{