Ruby: version.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

version.h
1#ifndef RUBY_TOPLEVEL_VERSION_H /*-*-C-*-vi:se ft=c:*/
2#define RUBY_TOPLEVEL_VERSION_H
10# define RUBY_VERSION_MAJOR RUBY_API_VERSION_MAJOR
11# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
12#define RUBY_VERSION_TEENY 5
13#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
14#define RUBY_PATCHLEVEL 208
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 "dev"
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 */
version.h