summaryrefslogtreecommitdiff
path: root/include/ruby/random.h
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-15 00:52:08 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-09-07 20:08:01 +0900
commitd6ec0ef59b4c7c95beaad09f77cb5f86a0901b97 (patch)
tree66d692d6abe2f2bb3c7c620544ba266b578d7909 /include/ruby/random.h
parentc449b9b02f63cf8268a0eb9639a43caf4598996d (diff)
Added `get_real` interface
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3024
Diffstat (limited to 'include/ruby/random.h')
-rw-r--r--include/ruby/random.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ruby/random.h b/include/ruby/random.h
index 21b6796a3e..4dd12d5f19 100644
--- a/include/ruby/random.h
+++ b/include/ruby/random.h
@@ -28,12 +28,14 @@ typedef struct {
typedef void rb_random_init_func(rb_random_t *, const uint32_t *, size_t);
typedef unsigned int rb_random_get_int32_func(rb_random_t *);
typedef void rb_random_get_bytes_func(rb_random_t *, void *, size_t);
+typedef double rb_random_get_real_func(rb_random_t *, int);
typedef struct {
size_t default_seed_bits;
rb_random_init_func *init;
rb_random_get_int32_func *get_int32;
rb_random_get_bytes_func *get_bytes;
+ rb_random_get_real_func *get_real;
} rb_random_interface_t;
#define rb_rand_if(obj) \