Ruby: version.h Source File

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

version.h
Go to the documentation of this file.
1#ifndef RUBY_TOPLEVEL_VERSION_H /*-*-C-*-vi:se ft=c:*/
2#define RUBY_TOPLEVEL_VERSION_H
11# define RUBY_VERSION_MAJOR RUBY_API_VERSION_MAJOR
12# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
13#define RUBY_VERSION_TEENY 5
14#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
15#define RUBY_PATCHLEVEL 211
16
17#define RUBY_RELEASE_YEAR 2022
18#define RUBY_RELEASE_MONTH 11
19#define RUBY_RELEASE_DAY 24
20
21#include "ruby/version.h"
22
23#ifndef TOKEN_PASTE
24#define TOKEN_PASTE(x,y) x##y
25#endif
26#define ONLY_ONE_DIGIT(x) TOKEN_PASTE(10,x) < 1000
27#define WITH_ZERO_PADDING(x) TOKEN_PASTE(0,x)
28#define RUBY_BIRTH_YEAR_STR STRINGIZE(RUBY_BIRTH_YEAR)
29#define RUBY_RELEASE_YEAR_STR STRINGIZE(RUBY_RELEASE_YEAR)
30#if ONLY_ONE_DIGIT(RUBY_RELEASE_MONTH)
31#define RUBY_RELEASE_MONTH_STR STRINGIZE(WITH_ZERO_PADDING(RUBY_RELEASE_MONTH))
32#else
33#define RUBY_RELEASE_MONTH_STR STRINGIZE(RUBY_RELEASE_MONTH)
34#endif
35#if ONLY_ONE_DIGIT(RUBY_RELEASE_DAY)
36#define RUBY_RELEASE_DAY_STR STRINGIZE(WITH_ZERO_PADDING(RUBY_RELEASE_DAY))
37#else
38#define RUBY_RELEASE_DAY_STR STRINGIZE(RUBY_RELEASE_DAY)
39#endif
40
41#if !defined RUBY_LIB_VERSION && defined RUBY_LIB_VERSION_STYLE
42# if RUBY_LIB_VERSION_STYLE == 3
43# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR)"."STRINGIZE(RUBY_API_VERSION_TEENY)
44# elif RUBY_LIB_VERSION_STYLE == 2
45# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR)
46# endif
47#endif
48
49#if RUBY_PATCHLEVEL == -1
50#define RUBY_PATCHLEVEL_STR "dev"
51#else
52#define RUBY_PATCHLEVEL_STR "p"STRINGIZE(RUBY_PATCHLEVEL)
53#endif
54
55#ifndef RUBY_REVISION
56# include "revision.h"
57#endif
58
59#ifdef RUBY_REVISION
60# if RUBY_PATCHLEVEL == -1
61# ifndef RUBY_BRANCH_NAME
62# define RUBY_BRANCH_NAME "master"
63# endif
64# define RUBY_REVISION_STR " "RUBY_BRANCH_NAME" "RUBY_REVISION
65# else
66# define RUBY_REVISION_STR " revision "RUBY_REVISION
67# endif
68#else
69# define RUBY_REVISION "HEAD"
70# define RUBY_REVISION_STR ""
71#endif
72#if !defined RUBY_RELEASE_DATETIME || RUBY_PATCHLEVEL != -1
73# undef RUBY_RELEASE_DATETIME
74# define RUBY_RELEASE_DATETIME RUBY_RELEASE_DATE
75#endif
76
77# define RUBY_DESCRIPTION_WITH(opt) \
78 "ruby "RUBY_VERSION \
79 RUBY_PATCHLEVEL_STR \
80 " ("RUBY_RELEASE_DATETIME \
81 RUBY_REVISION_STR")"opt" " \
82 "["RUBY_PLATFORM"]"
83# define RUBY_COPYRIGHT \
84 "ruby - Copyright (C) " \
85 RUBY_BIRTH_YEAR_STR"-" \
86 RUBY_RELEASE_YEAR_STR" " \
87 RUBY_AUTHOR
88
89#endif /* RUBY_TOPLEVEL_VERSION_H */
version.h
revision.h