Ruby  2.5.0dev(2017-10-22revision60238)
id_table.h
Go to the documentation of this file.
1 #ifndef RUBY_ID_TABLE_H
2 #define RUBY_ID_TABLE_H 1
3 #include "ruby/ruby.h"
4 
5 struct rb_id_table;
6 
7 /* compatible with ST_* */
13 };
14 
15 struct rb_id_table *rb_id_table_create(size_t size);
16 void rb_id_table_free(struct rb_id_table *tbl);
17 void rb_id_table_clear(struct rb_id_table *tbl);
18 
19 size_t rb_id_table_size(const struct rb_id_table *tbl);
20 size_t rb_id_table_memsize(const struct rb_id_table *tbl);
21 
22 int rb_id_table_insert(struct rb_id_table *tbl, ID id, VALUE val);
23 int rb_id_table_lookup(struct rb_id_table *tbl, ID id, VALUE *valp);
24 int rb_id_table_delete(struct rb_id_table *tbl, ID id);
25 
28 void rb_id_table_foreach(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, void *data);
30 
31 #endif /* RUBY_ID_TABLE_H */
Definition: st.h:99
enum rb_id_table_iterator_result rb_id_table_foreach_values_func_t(VALUE val, void *data)
size_t rb_id_table_memsize(const struct rb_id_table *tbl)
Definition: id_table.c:123
Definition: st.h:99
Definition: st.h:99
void rb_id_table_foreach_values(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, void *data)
Definition: id_table.c:289
int rb_id_table_lookup(struct rb_id_table *tbl, ID id, VALUE *valp)
Definition: id_table.c:226
void rb_id_table_free(struct rb_id_table *tbl)
Definition: id_table.c:102
#define val
void rb_id_table_clear(struct rb_id_table *tbl)
Definition: id_table.c:109
int rb_id_table_delete(struct rb_id_table *tbl, ID id)
Definition: id_table.c:262
struct rb_id_table * rb_id_table_create(size_t size)
Definition: id_table.c:95
size_t rb_id_table_size(const struct rb_id_table *tbl)
Definition: id_table.c:117
unsigned long ID
Definition: ruby.h:86
unsigned long VALUE
Definition: ruby.h:85
int size
Definition: encoding.c:57
enum rb_id_table_iterator_result rb_id_table_foreach_func_t(ID id, VALUE val, void *data)
rb_id_table_iterator_result
Definition: id_table.h:8
void rb_id_table_foreach(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, void *data)
Definition: id_table.c:270
int rb_id_table_insert(struct rb_id_table *tbl, ID id, VALUE val)
Definition: id_table.c:256