GRAYBYTE WORDPRESS FILE MANAGER2904

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/ruby30/include/ruby/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/ruby30/include/ruby//random.h
#ifndef RUBY_RANDOM_H
#define RUBY_RANDOM_H 1
/**
 * @file
 * @date       Sat May  7 11:51:14 JST 2016
 * @copyright  2007-2020 Yukihiro Matsumoto
 * @copyright  This  file  is   a  part  of  the   programming  language  Ruby.
 *             Permission  is hereby  granted,  to  either redistribute  and/or
 *             modify this file, provided that  the conditions mentioned in the
 *             file COPYING are met.  Consult the file for details.
 */

#include "ruby/ruby.h"

RBIMPL_SYMBOL_EXPORT_BEGIN()

struct rb_random_struct {
    VALUE seed;
};
typedef struct rb_random_struct rb_random_t;

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_RANDOM_INTERFACE_DECLARE(prefix) \
    static void prefix##_init(rb_random_t *, const uint32_t *, size_t); \
    static unsigned int prefix##_get_int32(rb_random_t *); \
    static void prefix##_get_bytes(rb_random_t *, void *, size_t)

#define RB_RANDOM_INTERFACE_DECLARE_WITH_REAL(prefix) \
    RB_RANDOM_INTERFACE_DECLARE(prefix); \
    static double prefix##_get_real(rb_random_t *, int)

#define RB_RANDOM_INTERFACE_DEFINE(prefix) \
    prefix##_init, \
    prefix##_get_int32, \
    prefix##_get_bytes

#define RB_RANDOM_INTERFACE_DEFINE_WITH_REAL(prefix) \
    RB_RANDOM_INTERFACE_DEFINE(prefix), \
    prefix##_get_real

#if defined _WIN32 && !defined __CYGWIN__
typedef rb_data_type_t rb_random_data_type_t;
# define RB_RANDOM_PARENT 0
#else
typedef const rb_data_type_t rb_random_data_type_t;
# define RB_RANDOM_PARENT &rb_random_data_type
#endif

#define RB_RANDOM_DATA_INIT_PARENT(random_data) \
    rbimpl_random_data_init_parent(&random_data)

void rb_random_mark(void *ptr);
void rb_random_base_init(rb_random_t *rnd);
double rb_int_pair_to_real(uint32_t a, uint32_t b, int excl);
void rb_rand_bytes_int32(rb_random_get_int32_func *, rb_random_t *, void *, size_t);
RUBY_EXTERN const rb_data_type_t rb_random_data_type;

RBIMPL_SYMBOL_EXPORT_END()

RBIMPL_ATTR_PURE_UNLESS_DEBUG()
/* :TODO: can this function be __attribute__((returns_nonnull)) or not? */
static inline const rb_random_interface_t *
rb_rand_if(VALUE obj)
{
    RBIMPL_ASSERT_OR_ASSUME(RTYPEDDATA_P(obj));
    const struct rb_data_type_struct *t = RTYPEDDATA_TYPE(obj);
    const void *ret = t->data;
    return RBIMPL_CAST((const rb_random_interface_t *)ret);
}

RBIMPL_ATTR_NOALIAS()
static inline void
rbimpl_random_data_init_parent(rb_random_data_type_t *random_data)
{
#if defined _WIN32 && !defined __CYGWIN__
    random_data->parent = &rb_random_data_type;
#endif
}

#endif /* RUBY_RANDOM_H */

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
January 01 1970 00:00:00
root / root
0
backward
--
July 17 2024 08:38:54
root / linksafe
0755
internal
--
July 17 2024 08:38:54
root / linksafe
0755
assert.h
7.539 KB
June 26 2024 13:55:16
root / linksafe
0644
atomic.h
8.86 KB
June 26 2024 13:55:16
root / linksafe
0644
backward.h
2.576 KB
June 26 2024 13:55:16
root / linksafe
0644
config-x86_64.h
12.811 KB
June 26 2024 13:55:16
root / linksafe
0644
config.h
1.187 KB
June 26 2024 13:55:16
root / linksafe
0644
debug.h
4.503 KB
June 26 2024 13:55:16
root / linksafe
0644
defines.h
2.489 KB
June 26 2024 13:55:16
root / linksafe
0644
digest.h
1.69 KB
June 26 2024 13:55:16
root / linksafe
0644
encoding.h
17.971 KB
June 26 2024 13:55:16
root / linksafe
0644
intern.h
2.338 KB
June 26 2024 13:55:16
root / linksafe
0644
io.h
5.52 KB
June 26 2024 13:55:16
root / linksafe
0644
memory_view.h
6.306 KB
June 26 2024 13:55:16
root / linksafe
0644
missing.h
5.548 KB
June 26 2024 13:55:16
root / linksafe
0644
onigmo.h
43.611 KB
June 26 2024 13:55:16
root / linksafe
0644
oniguruma.h
0.256 KB
June 26 2024 13:55:16
root / linksafe
0644
ractor.h
2.095 KB
June 26 2024 13:55:16
root / linksafe
0644
random.h
2.921 KB
June 26 2024 13:55:16
root / linksafe
0644
re.h
1.155 KB
June 26 2024 13:55:16
root / linksafe
0644
regex.h
0.996 KB
June 26 2024 13:55:16
root / linksafe
0644
ruby.h
4.996 KB
June 26 2024 13:55:16
root / linksafe
0644
st.h
7.388 KB
June 26 2024 13:55:16
root / linksafe
0644
subst.h
0.796 KB
June 26 2024 13:55:16
root / linksafe
0644
thread.h
1.43 KB
June 26 2024 13:55:16
root / linksafe
0644
thread_native.h
2.36 KB
June 26 2024 13:55:16
root / linksafe
0644
util.h
1.604 KB
June 26 2024 13:55:16
root / linksafe
0644
version.h
2.058 KB
June 26 2024 13:55:16
root / linksafe
0644
vm.h
1.641 KB
June 26 2024 13:55:16
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF