Sha256: cebb56c5ee384c508f199694186f979b0acc3a367fad298cf81ed59b322fe079

Contents?: true

Size: 1.47 KB

Versions: 39

Compression:

Stored size: 1.47 KB

Contents

#ifndef RUBY_ID_TABLE_H
#define RUBY_ID_TABLE_H 1
#include "ruby/ruby.h"

struct rb_id_table;

/* compatible with ST_* */
enum rb_id_table_iterator_result {
    ID_TABLE_CONTINUE = ST_CONTINUE,
    ID_TABLE_STOP     = ST_STOP,
    ID_TABLE_DELETE   = ST_DELETE,
    ID_TABLE_REPLACE  = ST_REPLACE,
    ID_TABLE_ITERATOR_RESULT_END
};

struct rb_id_table *rb_id_table_create(size_t size);
void rb_id_table_free(struct rb_id_table *tbl);
void rb_id_table_clear(struct rb_id_table *tbl);

size_t rb_id_table_size(const struct rb_id_table *tbl);
size_t rb_id_table_memsize(const struct rb_id_table *tbl);

int rb_id_table_insert(struct rb_id_table *tbl, ID id, VALUE val);
int rb_id_table_lookup(struct rb_id_table *tbl, ID id, VALUE *valp);
int rb_id_table_delete(struct rb_id_table *tbl, ID id);

typedef enum rb_id_table_iterator_result rb_id_table_update_callback_func_t(ID *id, VALUE *val, void *data, int existing);
typedef enum rb_id_table_iterator_result rb_id_table_foreach_func_t(ID id, VALUE val, void *data);
typedef enum rb_id_table_iterator_result rb_id_table_foreach_values_func_t(VALUE val, void *data);
void rb_id_table_foreach(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, void *data);
void rb_id_table_foreach_with_replace(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, rb_id_table_update_callback_func_t *replace, void *data);
void rb_id_table_foreach_values(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, void *data);

#endif	/* RUBY_ID_TABLE_H */

Version data entries

39 entries across 27 versions & 3 rubygems

Version Path
debase-ruby_core_source-3.3.6 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
debase-ruby_core_source-3.3.5 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
avalara_sdk-24.2.29 vendor/bundle/ruby/2.7.0/gems/debase-ruby_core_source-3.3.1/lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
avalara_sdk-24.2.29 vendor/bundle/ruby/2.7.0/gems/debase-ruby_core_source-0.10.16/lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
debase-ruby_core_source-3.3.1 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
debase-ruby_core_source-3.3.0 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
debase-ruby_core_source-3.2.3 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
debase-ruby_core_source-3.2.2 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
debase-ruby_core_source-3.2.1 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
debase-ruby_core_source-3.2.0 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
debase-ruby_core_source-0.10.18 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
debase-ruby_core_source-0.10.17 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
debase-ruby_core_source-0.10.16 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
debase-ruby_core_source-0.10.15 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
debase-ruby_core_source-0.10.14 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/debase-ruby_core_source-0.10.12/lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/debase-ruby_core_source-0.10.13/lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
debase-ruby_core_source-0.10.13 lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/debase-ruby_core_source-0.10.12/lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/debase-ruby_core_source-0.10.12/lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h