Esempio n. 1
0
static mrb_value 
mrb_random_g_srand(mrb_state *mrb, mrb_value self)
{
  mrb_value random = mrb_const_get(mrb,
          mrb_obj_value(mrb_class_get(mrb, "Random")),
          mrb_intern_lit(mrb, "DEFAULT"));
  return mrb_random_srand(mrb, random);
}
Esempio n. 2
0
File: random.c Progetto: ASnow/mruby
static mrb_value
mrb_random_g_srand(mrb_state *mrb, mrb_value self)
{
  mrb_value random = get_random(mrb);
  return mrb_random_srand(mrb, random);
}
Esempio n. 3
0
static mrb_value mrb_random_init(mrb_state *mrb, mrb_value self)
{
  mrb_random_srand(mrb, self);
  return self;
}