1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/-test-/st/numhash/numhash.c (numhash_alloc): free st_table.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-02-07 05:43:49 +00:00
parent d82aafd1b0
commit af01b0fb07

View file

@ -1,10 +1,16 @@
#include <ruby.h>
#include <ruby/st.h>
static void
numhash_free(void *ptr)
{
if (ptr) st_free_table(ptr);
}
static VALUE
numhash_alloc(VALUE klass)
{
return Data_Wrap_Struct(klass, 0, 0, 0);
return Data_Wrap_Struct(klass, 0, numhash_free, 0);
}
static VALUE