Ruby: include/ruby/internal/intern/random.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

random.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERN_RANDOM_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERN_RANDOM_H
27#include "ruby/internal/dllexport.h"
28#include "ruby/internal/value.h"
29
30 RBIMPL_SYMBOL_EXPORT_BEGIN()
31
32/* random.c */
33unsigned int rb_genrand_int32(void);
34double rb_genrand_real(void);
35void rb_reset_random_seed(void);
36 VALUE rb_random_bytes(VALUE rnd, long n);
37 VALUE rb_random_int(VALUE rnd, VALUE max);
38unsigned int rb_random_int32(VALUE rnd);
39double rb_random_real(VALUE rnd);
40unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit);
41unsigned long rb_genrand_ulong_limited(unsigned long i);
42
43 RBIMPL_SYMBOL_EXPORT_END()
44
45#endif /* RBIMPL_INTERN_RANDOM_H */
dllexport.h
Tewaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:86
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:77
max
int max
Definition: enough.c:225
rb_genrand_ulong_limited
unsigned long rb_genrand_ulong_limited(unsigned long i)
Definition: random.c:975
rb_random_real
double rb_random_real(VALUE rnd)
Definition: random.c:1047
rb_random_int32
unsigned int rb_random_int32(VALUE rnd)
Definition: random.c:1004
rb_random_int
VALUE rb_random_int(VALUE rnd, VALUE max)
rb_reset_random_seed
void rb_reset_random_seed(void)
Definition: random.c:1664
rb_random_bytes
VALUE rb_random_bytes(VALUE rnd, long n)
Definition: random.c:1205
rb_genrand_real
double rb_genrand_real(void)
Definition: random.c:196
rb_random_ulong_limited
unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit)
Definition: random.c:1107
rb_genrand_int32
unsigned int rb_genrand_int32(void)
Definition: random.c:189
value.h
Defines VALUE and ID.
VALUE
unsigned long VALUE
Definition: value.h:38