mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
separate rb_random_t
* 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.
This commit is contained in:
parent
f4d5273989
commit
af5e87ab21
Notes:
git
2020-09-07 20:08:35 +09:00
8 changed files with 774 additions and 121 deletions
11
ext/-test-/random/init.c
Normal file
11
ext/-test-/random/init.c
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue