Skip to content

Instantly share code, notes, and snippets.

@methodmissing
Created August 29, 2009 23:42
Show Gist options
  • Select an option

  • Save methodmissing/177760 to your computer and use it in GitHub Desktop.

Select an option

Save methodmissing/177760 to your computer and use it in GitHub Desktop.
static struct st_hash_type objhash = {
rb_any_cmp,
rb_any_hash,
};
static VALUE
hash_alloc(klass)
VALUE klass;
{
VALUE hash = hash_alloc0(klass);
RHASH(hash)->tbl = st_init_table(&objhash);
return hash;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment