Ruby 3.4.5p51 (2025-07-16 revision 20cda200d3ce092571d0b5d342dadca69636cb0f)
|
Routines to manipulate struct RHash. More...
#include "ruby/internal/config.h"
#include "ruby/internal/dllexport.h"
#include "ruby/internal/value.h"
#include "ruby/backward.h"
Go to the source code of this file.
Macros | |
#define | RHASH_TBL(h) |
Retrieves the internal table. | |
#define | RHASH_IFNONE(h) |
#define | RHASH_SIZE(h) |
Queries the size of the hash. | |
#define | RHASH_EMPTY_P(h) |
Checks if the hash is empty. | |
#define | RHASH_SET_IFNONE(h, ifnone) |
Destructively updates the default value of the hash. |
Functions | |
size_t | rb_hash_size_num (VALUE hash) |
This is the implementation detail of RHASH_SIZE. | |
struct st_table * | rb_hash_tbl (VALUE hash, const char *file, int line) |
This is the implementation detail of RHASH_TBL. | |
VALUE | rb_hash_set_ifnone (VALUE hash, VALUE ifnone) |
This is the implementation detail of RHASH_SET_IFNONE. |
Routines to manipulate struct RHash.
Definition in file rhash.h.
#define RHASH_EMPTY_P | ( | h | ) |
Checks if the hash is empty.
[in] | h | An instance of RHash. |
true | It is. |
false | It isn't. |
Definition at line 79 of file rhash.h.
Referenced by rb_extract_keywords().
#define RHASH_IFNONE | ( | h | ) |
#define RHASH_SET_IFNONE | ( | h, | |
ifnone ) |
Destructively updates the default value of the hash.
[out] | h | An instance of RHash. |
[in] | ifnone | Arbitrary default value. |
#define RHASH_SIZE | ( | h | ) |
Queries the size of the hash.
Size here means the number of keys that the hash stores.
[in] | h | An instance of RHash. |
Definition at line 69 of file rhash.h.
Referenced by rb_get_kwargs(), rb_hash_size(), and rb_hash_size_num().
#define RHASH_TBL | ( | h | ) |
Retrieves the internal table.
[in] | h | An instance of RHash. |
This is the implementation detail of RHASH_SET_IFNONE.
People don't call this directly.
[out] | hash | An instance of RHash. |
[in] | ifnone | Arbitrary default value. |
size_t rb_hash_size_num | ( | VALUE | hash | ) |
This is the implementation detail of RHASH_SIZE.
People don't call this directly.
[in] | hash | An instance of RHash. |
This is the implementation detail of RHASH_TBL.
People don't call this directly.
[in] | hash | An instance of RHash. |
[in] | file | The __FILE__. |
[in] | line | The __LINE__. |