3 VALUE
sh_new_hash(VALUE self
) {
7 VALUE
sh_access(VALUE self
, VALUE hash
, VALUE key
) {
8 return rb_hash_aref(hash
, key
);
11 VALUE
sh_insert(VALUE self
, VALUE hash
, VALUE key
, VALUE val
) {
12 return rb_hash_aset(hash
, key
, val
);
15 VALUE
sh_remove(VALUE self
, VALUE hash
, VALUE key
) {
16 return rb_hash_delete(hash
, key
);
19 void Init_subtend_hash() {
21 cls
= rb_define_class("SubtendHash", rb_cObject
);
22 rb_define_method(cls
, "new_hash", sh_new_hash
, 0);
23 rb_define_method(cls
, "access", sh_access
, 2);
24 rb_define_method(cls
, "insert", sh_insert
, 3);
25 rb_define_method(cls
, "remove", sh_remove
, 2);