debase-ruby_core_source 3.2.0 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +10 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/addr2line.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/builtin.h +117 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/ccan/list/list.h +789 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/ccan/str/str.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/constant.h +53 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/darray.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/debug_counter.h +423 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/dln.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/eval_intern.h +341 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/hrtime.h +227 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/id.h +343 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/id_table.h +39 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/insns_info.inc +9133 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/array.h +144 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/basic_operators.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/bignum.h +244 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/bits.h +568 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/class.h +226 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/cmdlineopt.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/compar.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/compile.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/compilers.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/cont.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/dir.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/enc.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/encoding.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/enum.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/enumerator.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/error.h +213 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/eval.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/file.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/fixnum.h +184 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/gc.h +361 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/hash.h +190 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/imemo.h +241 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/inits.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/io.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/load.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/loadpath.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/math.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/missing.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/numeric.h +273 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/object.h +59 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/parse.h +133 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/proc.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/process.h +124 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/ractor.h +6 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/random.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/range.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/rational.h +71 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/re.h +28 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/ruby_parser.h +69 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/sanitizers.h +186 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/serial.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/signal.h +25 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/static_assert.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/string.h +160 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/struct.h +127 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/symbol.h +42 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/thread.h +74 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/time.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/transcode.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/util.h +27 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/variable.h +71 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/vm.h +129 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/warnings.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal.h +112 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/iseq.h +334 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/method.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/node.h +125 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/node_name.inc +210 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/parse.h +232 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/parser_bits.h +564 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/parser_node.h +133 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/parser_st.h +162 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/parser_value.h +106 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/probes_helper.h +42 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/ractor_core.h +387 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/regint.h +996 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/revision.h +5 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/rjit.h +103 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/rjit_c.h +165 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/ruby_assert.h +14 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/rubyparser.h +628 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/shape.h +232 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/thread_none.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/thread_pthread.h +126 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/thread_win32.h +58 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/timev.h +58 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/variable.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/version.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/vm.inc +5396 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/vm_callinfo.h +608 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/vm_core.h +2089 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/vm_debug.h +122 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/vm_exec.h +199 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/vm_insnhelper.h +271 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/vm_opts.h +67 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/vm_sync.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/yjit.h +70 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +120 -3
@@ -0,0 +1,138 @@
|
|
1
|
+
#ifndef RUBY_TRANSCODE_DATA_H
|
2
|
+
#define RUBY_TRANSCODE_DATA_H 1
|
3
|
+
/**********************************************************************
|
4
|
+
|
5
|
+
transcode_data.h -
|
6
|
+
|
7
|
+
$Author$
|
8
|
+
created at: Mon 10 Dec 2007 14:01:47 JST 2007
|
9
|
+
|
10
|
+
Copyright (C) 2007 Martin Duerst
|
11
|
+
|
12
|
+
**********************************************************************/
|
13
|
+
|
14
|
+
#include "ruby/ruby.h"
|
15
|
+
|
16
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
17
|
+
|
18
|
+
#define WORDINDEX_SHIFT_BITS 2
|
19
|
+
#define WORDINDEX2INFO(widx) ((widx) << WORDINDEX_SHIFT_BITS)
|
20
|
+
#define INFO2WORDINDEX(info) ((info) >> WORDINDEX_SHIFT_BITS)
|
21
|
+
#define BYTE_LOOKUP_BASE(bl) ((bl)[0])
|
22
|
+
#define BYTE_LOOKUP_INFO(bl) ((bl)[1])
|
23
|
+
|
24
|
+
#define PType (unsigned int)
|
25
|
+
|
26
|
+
#define NOMAP (PType 0x01) /* direct map */
|
27
|
+
#define ONEbt (0x02) /* one byte payload */
|
28
|
+
#define TWObt (0x03) /* two bytes payload */
|
29
|
+
#define THREEbt (0x05) /* three bytes payload */
|
30
|
+
#define FOURbt (0x06) /* four bytes payload, UTF-8 only, macros start at getBT0 */
|
31
|
+
#define INVALID (PType 0x07) /* invalid byte sequence */
|
32
|
+
#define UNDEF (PType 0x09) /* legal but undefined */
|
33
|
+
#define ZERObt (PType 0x0A) /* zero bytes of payload, i.e. remove */
|
34
|
+
#define FUNii (PType 0x0B) /* function from info to info */
|
35
|
+
#define FUNsi (PType 0x0D) /* function from start to info */
|
36
|
+
#define FUNio (PType 0x0E) /* function from info to output */
|
37
|
+
#define FUNso (PType 0x0F) /* function from start to output */
|
38
|
+
#define STR1 (PType 0x11) /* string 4 <= len <= 259 bytes: 1byte length + content */
|
39
|
+
#define GB4bt (PType 0x12) /* GB18030 four bytes payload */
|
40
|
+
#define FUNsio (PType 0x13) /* function from start and info to output */
|
41
|
+
|
42
|
+
#define STR1_LENGTH(byte_addr) (unsigned int)(*(byte_addr) + 4)
|
43
|
+
#define STR1_BYTEINDEX(w) ((w) >> 6)
|
44
|
+
#define makeSTR1(bi) (((bi) << 6) | STR1)
|
45
|
+
#define makeSTR1LEN(len) ((len)-4)
|
46
|
+
|
47
|
+
#define o1(b1) (PType((((unsigned char)(b1))<<8)|ONEbt))
|
48
|
+
#define o2(b1,b2) (PType((((unsigned char)(b1))<<8)|\
|
49
|
+
(((unsigned char)(b2))<<16)|\
|
50
|
+
TWObt))
|
51
|
+
#define o3(b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|\
|
52
|
+
(((unsigned char)(b2))<<16)|\
|
53
|
+
(((unsigned int)(unsigned char)(b3))<<24)|\
|
54
|
+
THREEbt)&\
|
55
|
+
0xffffffffU))
|
56
|
+
#define o4(b0,b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|\
|
57
|
+
(((unsigned char)(b2))<<16)|\
|
58
|
+
(((unsigned int)(unsigned char)(b3))<<24)|\
|
59
|
+
((((unsigned char)(b0))&0x07)<<5)|\
|
60
|
+
FOURbt)&\
|
61
|
+
0xffffffffU))
|
62
|
+
#define g4(b0,b1,b2,b3) (PType(((((unsigned char)(b0))<<8)|\
|
63
|
+
(((unsigned char)(b2))<<16)|\
|
64
|
+
((((unsigned char)(b1))&0x0f)<<24)|\
|
65
|
+
((((unsigned int)(unsigned char)(b3))&0x0f)<<28)|\
|
66
|
+
GB4bt)&\
|
67
|
+
0xffffffffU))
|
68
|
+
#define funsio(diff) (PType((((unsigned int)(diff))<<8)|FUNsio))
|
69
|
+
|
70
|
+
#define getBT1(a) ((unsigned char)((a)>> 8))
|
71
|
+
#define getBT2(a) ((unsigned char)((a)>>16))
|
72
|
+
#define getBT3(a) ((unsigned char)((a)>>24))
|
73
|
+
#define getBT0(a) (((unsigned char)((a)>> 5)&0x07)|0xF0) /* for UTF-8 only!!! */
|
74
|
+
|
75
|
+
#define getGB4bt0(a) ((unsigned char)((a)>> 8))
|
76
|
+
#define getGB4bt1(a) (((unsigned char)((a)>>24)&0x0F)|0x30)
|
77
|
+
#define getGB4bt2(a) ((unsigned char)((a)>>16))
|
78
|
+
#define getGB4bt3(a) (((unsigned char)((a)>>28)&0x0F)|0x30)
|
79
|
+
|
80
|
+
#define o2FUNii(b1,b2) (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|FUNii))
|
81
|
+
|
82
|
+
/* do we need these??? maybe not, can be done with simple tables */
|
83
|
+
#define ONETRAIL /* legal but undefined if one more trailing UTF-8 */
|
84
|
+
#define TWOTRAIL /* legal but undefined if two more trailing UTF-8 */
|
85
|
+
#define THREETRAIL /* legal but undefined if three more trailing UTF-8 */
|
86
|
+
|
87
|
+
typedef enum {
|
88
|
+
asciicompat_converter, /* ASCII-compatible -> ASCII-compatible */
|
89
|
+
asciicompat_decoder, /* ASCII-incompatible -> ASCII-compatible */
|
90
|
+
asciicompat_encoder /* ASCII-compatible -> ASCII-incompatible */
|
91
|
+
/* ASCII-incompatible -> ASCII-incompatible is intentionally omitted. */
|
92
|
+
} rb_transcoder_asciicompat_type_t;
|
93
|
+
|
94
|
+
typedef struct rb_transcoder rb_transcoder;
|
95
|
+
|
96
|
+
/* static structure, one per supported encoding pair */
|
97
|
+
struct rb_transcoder {
|
98
|
+
const char *src_encoding;
|
99
|
+
const char *dst_encoding;
|
100
|
+
unsigned int conv_tree_start;
|
101
|
+
const unsigned char *byte_array;
|
102
|
+
unsigned int byte_array_length;
|
103
|
+
const unsigned int *word_array;
|
104
|
+
unsigned int word_array_length;
|
105
|
+
int word_size;
|
106
|
+
int input_unit_length;
|
107
|
+
int max_input;
|
108
|
+
int max_output;
|
109
|
+
rb_transcoder_asciicompat_type_t asciicompat_type;
|
110
|
+
size_t state_size;
|
111
|
+
int (*state_init_func)(void*); /* ret==0:success ret!=0:failure(errno) */
|
112
|
+
int (*state_fini_func)(void*); /* ret==0:success ret!=0:failure(errno) */
|
113
|
+
VALUE (*func_ii)(void*, VALUE); /* info -> info */
|
114
|
+
VALUE (*func_si)(void*, const unsigned char*, size_t); /* start -> info */
|
115
|
+
ssize_t (*func_io)(void*, VALUE, const unsigned char*, size_t); /* info -> output */
|
116
|
+
ssize_t (*func_so)(void*, const unsigned char*, size_t, unsigned char*, size_t); /* start -> output */
|
117
|
+
ssize_t (*finish_func)(void*, unsigned char*, size_t); /* -> output */
|
118
|
+
ssize_t (*resetsize_func)(void*); /* -> len */
|
119
|
+
ssize_t (*resetstate_func)(void*, unsigned char*, size_t); /* -> output */
|
120
|
+
ssize_t (*func_sio)(void*, const unsigned char*, size_t, VALUE, unsigned char*, size_t); /* start -> output */
|
121
|
+
};
|
122
|
+
|
123
|
+
void rb_declare_transcoder(const char *enc1, const char *enc2, const char *lib);
|
124
|
+
void rb_register_transcoder(const rb_transcoder *);
|
125
|
+
|
126
|
+
/*
|
127
|
+
* To get rid of collision of initializer symbols in statically-linked encodings
|
128
|
+
* and transcoders
|
129
|
+
*/
|
130
|
+
#if defined(EXTSTATIC) && EXTSTATIC
|
131
|
+
# define TRANS_INIT(name) void Init_trans_ ## name(void)
|
132
|
+
#else
|
133
|
+
# define TRANS_INIT(name) void Init_ ## name(void)
|
134
|
+
#endif
|
135
|
+
|
136
|
+
RUBY_SYMBOL_EXPORT_END
|
137
|
+
|
138
|
+
#endif /* RUBY_TRANSCODE_DATA_H */
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#ifndef RUBY_TOPLEVEL_VARIABLE_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define RUBY_TOPLEVEL_VARIABLE_H
|
3
|
+
/**
|
4
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
5
|
+
* @copyright This file is a part of the programming language Ruby.
|
6
|
+
* Permission is hereby granted, to either redistribute and/or
|
7
|
+
* modify this file, provided that the conditions mentioned in the
|
8
|
+
* file COPYING are met. Consult the file for details.
|
9
|
+
*/
|
10
|
+
|
11
|
+
/* per-object */
|
12
|
+
|
13
|
+
#include "shape.h"
|
14
|
+
|
15
|
+
struct gen_ivtbl {
|
16
|
+
#if !SHAPE_IN_BASIC_FLAGS
|
17
|
+
uint16_t shape_id;
|
18
|
+
#endif
|
19
|
+
uint32_t numiv;
|
20
|
+
VALUE ivptr[FLEX_ARY_LEN];
|
21
|
+
};
|
22
|
+
|
23
|
+
int rb_ivar_generic_ivtbl_lookup(VALUE obj, struct gen_ivtbl **);
|
24
|
+
|
25
|
+
#if !SHAPE_IN_BASIC_FLAGS
|
26
|
+
shape_id_t rb_generic_shape_id(VALUE obj);
|
27
|
+
#endif
|
28
|
+
|
29
|
+
|
30
|
+
#endif /* RUBY_TOPLEVEL_VARIABLE_H */
|
@@ -0,0 +1,65 @@
|
|
1
|
+
#ifndef RUBY_TOPLEVEL_VERSION_H /*-*-C-*-vi:se ft=c:*/
|
2
|
+
#define RUBY_TOPLEVEL_VERSION_H
|
3
|
+
/**
|
4
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
5
|
+
* @copyright This file is a part of the programming language Ruby.
|
6
|
+
* Permission is hereby granted, to either redistribute and/or
|
7
|
+
* modify this file, provided that the conditions mentioned in the
|
8
|
+
* file COPYING are met. Consult the file for details.
|
9
|
+
*/
|
10
|
+
# define RUBY_VERSION_MAJOR RUBY_API_VERSION_MAJOR
|
11
|
+
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
|
12
|
+
#define RUBY_VERSION_TEENY 0
|
13
|
+
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
14
|
+
#define RUBY_PATCHLEVEL -1
|
15
|
+
|
16
|
+
#include "ruby/version.h"
|
17
|
+
#include "ruby/internal/abi.h"
|
18
|
+
|
19
|
+
#ifndef RUBY_REVISION
|
20
|
+
#include "revision.h"
|
21
|
+
|
22
|
+
#ifndef TOKEN_PASTE
|
23
|
+
#define TOKEN_PASTE(x,y) x##y
|
24
|
+
#endif
|
25
|
+
#define ONLY_ONE_DIGIT(x) TOKEN_PASTE(10,x) < 1000
|
26
|
+
#define WITH_ZERO_PADDING(x) TOKEN_PASTE(0,x)
|
27
|
+
#define RUBY_BIRTH_YEAR_STR STRINGIZE(RUBY_BIRTH_YEAR)
|
28
|
+
#define RUBY_RELEASE_YEAR_STR STRINGIZE(RUBY_RELEASE_YEAR)
|
29
|
+
#if ONLY_ONE_DIGIT(RUBY_RELEASE_MONTH)
|
30
|
+
#define RUBY_RELEASE_MONTH_STR STRINGIZE(WITH_ZERO_PADDING(RUBY_RELEASE_MONTH))
|
31
|
+
#else
|
32
|
+
#define RUBY_RELEASE_MONTH_STR STRINGIZE(RUBY_RELEASE_MONTH)
|
33
|
+
#endif
|
34
|
+
#if ONLY_ONE_DIGIT(RUBY_RELEASE_DAY)
|
35
|
+
#define RUBY_RELEASE_DAY_STR STRINGIZE(WITH_ZERO_PADDING(RUBY_RELEASE_DAY))
|
36
|
+
#else
|
37
|
+
#define RUBY_RELEASE_DAY_STR STRINGIZE(RUBY_RELEASE_DAY)
|
38
|
+
#endif
|
39
|
+
|
40
|
+
#endif
|
41
|
+
|
42
|
+
#ifdef RUBY_ABI_VERSION
|
43
|
+
# define RUBY_ABI_VERSION_SUFFIX "+"STRINGIZE(RUBY_ABI_VERSION)
|
44
|
+
#else
|
45
|
+
# define RUBY_ABI_VERSION_SUFFIX ""
|
46
|
+
#endif
|
47
|
+
#if !defined RUBY_LIB_VERSION && defined RUBY_LIB_VERSION_STYLE
|
48
|
+
# if RUBY_LIB_VERSION_STYLE == 3
|
49
|
+
# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR) \
|
50
|
+
"."STRINGIZE(RUBY_API_VERSION_TEENY) RUBY_ABI_VERSION_SUFFIX
|
51
|
+
# elif RUBY_LIB_VERSION_STYLE == 2
|
52
|
+
# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR) \
|
53
|
+
RUBY_ABI_VERSION_SUFFIX
|
54
|
+
# endif
|
55
|
+
#endif
|
56
|
+
|
57
|
+
#if RUBY_PATCHLEVEL == -1
|
58
|
+
#define RUBY_PATCHLEVEL_STR "preview2"
|
59
|
+
#elif defined RUBY_ABI_VERSION
|
60
|
+
#error RUBY_ABI_VERSION is defined in non-development branch
|
61
|
+
#else
|
62
|
+
#define RUBY_PATCHLEVEL_STR ""
|
63
|
+
#endif
|
64
|
+
|
65
|
+
#endif /* RUBY_TOPLEVEL_VERSION_H */
|