* 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:
parent
d82aafd1b0
commit
af01b0fb07
@ -1,10 +1,16 @@
|
|||||||
#include <ruby.h>
|
#include <ruby.h>
|
||||||
#include <ruby/st.h>
|
#include <ruby/st.h>
|
||||||
|
|
||||||
|
static void
|
||||||
|
numhash_free(void *ptr)
|
||||||
|
{
|
||||||
|
if (ptr) st_free_table(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
numhash_alloc(VALUE klass)
|
numhash_alloc(VALUE klass)
|
||||||
{
|
{
|
||||||
return Data_Wrap_Struct(klass, 0, 0, 0);
|
return Data_Wrap_Struct(klass, 0, numhash_free, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user