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:
parent
d82aafd1b0
commit
af01b0fb07
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue