summaryrefslogtreecommitdiff
path: root/include/ruby/st.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby/st.h')
-rw-r--r--include/ruby/st.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/ruby/st.h b/include/ruby/st.h
index 1e4bb80686..b510989b6b 100644
--- a/include/ruby/st.h
+++ b/include/ruby/st.h
@@ -84,13 +84,12 @@ struct st_table {
const struct st_hash_type *type;
/* Number of entries currently in the table. */
st_index_t num_entries;
- /* Array of bins used for access by keys. */
- st_index_t *bins;
/* Start and bound index of entries in array entries.
entries_starts and entries_bound are in interval
[0,allocated_entries]. */
st_index_t entries_start, entries_bound;
- /* Array of size 2^entry_power. */
+ /* Array of size 2^entry_power.
+ Optionnally followed by an array of bins used for access by keys. */
st_table_entry *entries;
};
@@ -98,6 +97,8 @@ struct st_table {
enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK, ST_REPLACE};
+size_t rb_st_table_size(const struct st_table *tbl);
+#define st_table_size rb_st_table_size
st_table *rb_st_init_table(const struct st_hash_type *);
#define st_init_table rb_st_init_table
st_table *rb_st_init_table_with_size(const struct st_hash_type *, st_index_t);