Ruby  2.5.0dev(2017-10-22revision60238)
Macros | Functions | Variables
version.c File Reference
#include "ruby/ruby.h"
#include "version.h"
#include <stdio.h>

Go to the source code of this file.

Macros

#define EXIT_SUCCESS   0
 
#define PRINT(type)   puts(ruby_##type)
 
#define MKSTR(type)   rb_obj_freeze(rb_usascii_str_new_static(ruby_##type, sizeof(ruby_##type)-1))
 
#define MKINT(name)   INT2FIX(ruby_##name)
 

Functions

void Init_version (void)
 Defines platform-depended Ruby-level constants. More...
 
void ruby_show_version (void)
 Prints the version information of the CRuby interpreter to stdout. More...
 
void ruby_show_copyright (void)
 Prints the copyright notice of the CRuby interpreter to stdout. More...
 

Variables

const int ruby_api_version []
 
const char ruby_version [] = RUBY_VERSION
 
const char ruby_release_date [] = RUBY_RELEASE_DATE
 
const char ruby_platform [] = RUBY_PLATFORM
 
const int ruby_patchlevel = RUBY_PATCHLEVEL
 
const char ruby_description [] = RUBY_DESCRIPTION
 
const char ruby_copyright [] = RUBY_COPYRIGHT
 
const char ruby_engine [] = "ruby"
 

Macro Definition Documentation

◆ EXIT_SUCCESS

#define EXIT_SUCCESS   0

Definition at line 17 of file version.c.

◆ MKINT

#define MKINT (   name)    INT2FIX(ruby_##name)

Definition at line 22 of file version.c.

◆ MKSTR

#define MKSTR (   type)    rb_obj_freeze(rb_usascii_str_new_static(ruby_##type, sizeof(ruby_##type)-1))

Definition at line 21 of file version.c.

◆ PRINT

#define PRINT (   type)    puts(ruby_##type)

Definition at line 20 of file version.c.

Referenced by ruby_show_copyright(), and ruby_show_version().

Function Documentation

◆ Init_version()

void Init_version ( void  )

Defines platform-depended Ruby-level constants.

Definition at line 39 of file version.c.

References RUBY_PATCHLEVEL, ruby_patchlevel, and RUBY_REVISION.

Variable Documentation

◆ ruby_api_version

const int ruby_api_version[]
Initial value:
= {
}
#define RUBY_API_VERSION_TEENY
Definition: version.h:35
#define RUBY_API_VERSION_MAJOR
Definition: version.h:33
#define RUBY_API_VERSION_MINOR
Definition: version.h:34

Definition at line 24 of file version.c.

◆ ruby_copyright

const char ruby_copyright[] = RUBY_COPYRIGHT

Definition at line 34 of file version.c.

◆ ruby_engine

const char ruby_engine[] = "ruby"

Definition at line 35 of file version.c.

Referenced by ruby_process_options().

◆ ruby_patchlevel

const int ruby_patchlevel = RUBY_PATCHLEVEL

Definition at line 32 of file version.c.

Referenced by Init_version().

◆ ruby_platform

const char ruby_platform[] = RUBY_PLATFORM

Definition at line 31 of file version.c.

◆ ruby_release_date

const char ruby_release_date[] = RUBY_RELEASE_DATE

Definition at line 30 of file version.c.

◆ ruby_version

const char ruby_version[] = RUBY_VERSION

Definition at line 29 of file version.c.