numhash.c File Reference
`#include <ruby.h>`
`#include <ruby/st.h>`

Go to the source code of this file.

## Functions

static void | numhash_free (void *ptr)
static VALUE | numhash_alloc (VALUE klass)
static VALUE | numhash_init (VALUE self)
static VALUE | numhash_aref (VALUE self, VALUE key)
static VALUE | numhash_aset (VALUE self, VALUE key, VALUE data)
static int | numhash_i (st_data_t key, st_data_t value, st_data_t arg, int error)
static VALUE | numhash_each (VALUE self)
void | Init_numhash (void)

## Function Documentation

void Init_numhash | ( | void |  | ) |

Definition at line 61 of file numhash.c.

References numhash_alloc(), numhash_aref(), numhash_aset(), numhash_each(), numhash_init(), rb_cData, rb_define_alloc_func(), rb_define_class_under(), rb_define_method(), and rb_define_module().

static VALUE numhash_alloc | ( | VALUE | klass | ) |

static

Definition at line 11 of file numhash.c.

References Data_Wrap_Struct, and numhash_free().

Referenced by Init_numhash().

static VALUE numhash_aref | ( | VALUE | self,
|  | VALUE | key
| ) |  |

static

Definition at line 26 of file numhash.c.

References DATA_PTR, Qnil, rb_eArgError, rb_raise(), SPECIAL_CONST_P, and st_lookup.

Referenced by Init_numhash().

static VALUE numhash_aset | ( | VALUE | self,
|  | VALUE | key,
|  | VALUE | data
| ) |  |

static

Definition at line 36 of file numhash.c.

References DATA_PTR, rb_eArgError, rb_raise(), SPECIAL_CONST_P, and st_insert.

Referenced by Init_numhash().

static VALUE numhash_each | ( | VALUE | self | ) |

static

Definition at line 55 of file numhash.c.

References DATA_PTR, numhash_i(), Qfalse, Qtrue, and st_foreach.

Referenced by Init_numhash().

static void numhash_free | ( | void * | ptr | ) |

static

Definition at line 5 of file numhash.c.

References st_free_table.

Referenced by numhash_alloc().

static int numhash_i | ( | st_data_t | key,
|  | st_data_t | value,
|  | st_data_t | arg,
|  | int | error
| ) |  |

static

Definition at line 45 of file numhash.c.

References Qtrue, rb_eRuntimeError, rb_raise(), rb_yield_values(), ST_CHECK, and ST_CONTINUE.

Referenced by numhash_each().

static VALUE numhash_init | ( | VALUE | self | ) |

static

Definition at line 17 of file numhash.c.

References DATA_PTR, st_free_table, and st_init_numtable.

Referenced by Init_numhash().