mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
af5e87ab21
* random.c: separate abstract rb_random_t and rb_random_mt_t for Mersenne Twister implementation. * include/ruby/random.h: the interface for extensions of Random class. * DLL imported symbol reference is not constant on Windows. * check if properly initialized.
11 lines
308 B
C
11 lines
308 B
C
#include "ruby.h"
|
|
|
|
#define init(n) {void Init_random_##n(VALUE mod, VALUE base); Init_random_##n(mod, base);}
|
|
|
|
void
|
|
Init_random(void)
|
|
{
|
|
VALUE base = rb_const_get(rb_cRandom, rb_intern_const("Base"));
|
|
VALUE mod = rb_define_module_under(rb_define_module("Bug"), "Random");
|
|
TEST_INIT_FUNCS(init);
|
|
}
|