summaryrefslogtreecommitdiff
path: root/internal/hash.h
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-04-08 13:28:13 +0900
committerGitHub <noreply@github.com>2020-04-08 13:28:13 +0900
commit9e6e39c3512f7a962c44dc3729c98a0f8be90341 (patch)
tree901a22676d54d78240e450b64a8cd06eb1703910 /internal/hash.h
parent5ac4bf2cd87e1eb5779ca5ae7f96a1a22e8436d9 (diff)
downloadruby-9e6e39c3512f7a962c44dc3729c98a0f8be90341.tar.gz
Merge pull request #2991 from shyouhei/ruby.h
Split ruby.h
Diffstat (limited to 'internal/hash.h')
-rw-r--r--internal/hash.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/internal/hash.h b/internal/hash.h
index 90a27fd189..4c2e663a65 100644
--- a/internal/hash.h
+++ b/internal/hash.h
@@ -1,17 +1,17 @@
-#ifndef INTERNAL_HASH_H /* -*- C -*- */
-#define INTERNAL_HASH_H
-/**
+/** \noop-*-C-*-vi:ft=c
* @file
- * @brief Internal header for Hash.
- * @author \@shyouhei
+ * @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
* Permission is hereby granted, to either redistribute and/or
* modify this file, provided that the conditions mentioned in the
* file COPYING are met. Consult the file for details.
+ * @brief Internal header for Hash.
*/
-#include "ruby/config.h"
+#ifndef INTERNAL_HASH_H
+#define INTERNAL_HASH_H
+#include "ruby/3/config.h"
#include <stddef.h> /* for size_t */
-#include "internal/stdbool.h" /* for bool */
+#include "ruby/3/stdbool.h" /* for bool */
#include "ruby/ruby.h" /* for struct RBasic */
#include "ruby/st.h" /* for struct st_table */
@@ -200,9 +200,9 @@ RHASH_ST_CLEAR(VALUE h)
static inline unsigned
RHASH_AR_TABLE_SIZE_RAW(VALUE h)
{
- unsigned ret = FL_TEST_RAW(h, RHASH_AR_TABLE_SIZE_MASK);
+ VALUE ret = FL_TEST_RAW(h, RHASH_AR_TABLE_SIZE_MASK);
ret >>= RHASH_AR_TABLE_SIZE_SHIFT;
- return ret;
+ return (unsigned)ret;
}
static inline bool