aboutsummaryrefslogtreecommitdiffstats
path: root/internal
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-06-23 14:54:50 +0900
committerGitHub <noreply@github.com>2023-06-23 14:54:50 +0900
commit73529a12bbf5bb88b2596ca1169bd29dc75aa2e6 (patch)
tree2286fc3c47dbe1593e5c5465d8c4681e0b75308b /internal
parent00c1bd66d6fa24bd50bd3f20334ec162d0279f40 (diff)
downloadruby-73529a12bbf5bb88b2596ca1169bd29dc75aa2e6.tar.gz
Declare `RHASH_AR_TABLE` and `RHASH_ST_TABLE` return non-null
Diffstat (limited to 'internal')
-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)
{