use mrb_free to free random state

This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-04-29 09:13:30 +09:00
parent b6fc3f831d
commit 22469f3be1
+1 -6
View File
@@ -15,13 +15,8 @@
#define INSTANCE_RAND_SEED_KEY "$mrb_i_rand_seed"
#define MT_STATE_KEY "$mrb_i_mt_state"
static void mt_state_free(mrb_state *mrb, void *p)
{
mrb_free(mrb, p);
}
static const struct mrb_data_type mt_state_type = {
MT_STATE_KEY, mt_state_free,
MT_STATE_KEY, mrb_free,
};
static mt_state *mrb_mt_get_context(mrb_state *mrb, mrb_value self)