summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-21 04:43:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-21 04:43:51 +0000
commitbe4fc7941bff50f6c90210a1d9e9178ffc05adda (patch)
tree56ddc3c8681a1b025972dd5b62317ef5f06cc06b /include
parentc629aecbc810e8014a88943a2b3ddcb716aa6ffb (diff)
* st.c (struct st_table_entry): add new members, fore and back, to
iterate in inserted order. * include/ruby/st.h (struct st_table): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/st.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/ruby/st.h b/include/ruby/st.h
index 2742f8fd97..12dbd2c50d 100644
--- a/include/ruby/st.h
+++ b/include/ruby/st.h
@@ -34,6 +34,7 @@ struct st_table {
int num_bins;
int num_entries;
struct st_table_entry **bins;
+ struct st_table_entry *head;
};
#define st_is_member(table,key) st_lookup(table,key,(st_data_t *)0)
@@ -62,9 +63,11 @@ int st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);
int st_insert(st_table *, st_data_t, st_data_t);
int st_lookup(st_table *, st_data_t, st_data_t *);
int st_foreach(st_table *, int (*)(ANYARGS), st_data_t);
+int st_reverse_foreach(st_table *, int (*)(ANYARGS), st_data_t);
void st_add_direct(st_table *, st_data_t, st_data_t);
void st_free_table(st_table *);
void st_cleanup_safe(st_table *, st_data_t);
+void st_clear(st_table *);
st_table *st_copy(st_table *);
int st_numcmp(long, long);
int st_numhash(long);