Ruby: include/ruby/internal/globals.h File Reference

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

Macros | Variables
globals.h File Reference

Ruby-level global variables / constants, visible from C. More...

`#include "ruby/internal/attr/pure.h"`
`#include "ruby/internal/dllexport.h"`
`#include "ruby/internal/fl_type.h"`
`#include "ruby/internal/special_consts.h"`
`#include "ruby/internal/value.h"`
`#include "ruby/internal/value_type.h"`

Go to the source code of this file.

## Macros
#define | RUBY_INTEGER_UNIFICATION 1
#define | CLASS_OF rb_class_of

## Variables
VALUE | rb_mKernel
| Kernel module. More...
VALUE | rb_mComparable
VALUE | rb_mEnumerable
VALUE | rb_mErrno
VALUE | rb_mFileTest
VALUE | rb_mGC
VALUE | rb_mMath
VALUE | rb_mProcess
VALUE | rb_mWaitReadable
VALUE | rb_mWaitWritable
VALUE | rb_cBasicObject
| BasicObject class. More...
VALUE | rb_cObject
| Object class. More...
VALUE | rb_cArray
VALUE | rb_cBinding
VALUE | rb_cClass
| Class class. More...
VALUE | rb_cDir
VALUE | rb_cEncoding
VALUE | rb_cEnumerator
VALUE | rb_cFalseClass
| FalseClass class. More...
VALUE | rb_cFile
VALUE | rb_cComplex
VALUE | rb_cFloat
VALUE | rb_cHash
VALUE | rb_cIO
VALUE | rb_cInteger
VALUE | rb_cMatch
VALUE | rb_cMethod
VALUE | rb_cModule
| Module class. More...
VALUE | rb_cNameErrorMesg
VALUE | rb_cNilClass
| NilClass class. More...
VALUE | rb_cNumeric
VALUE | rb_cProc
VALUE | rb_cRandom
VALUE | rb_cRange
VALUE | rb_cRational
VALUE | rb_cRegexp
VALUE | rb_cStat
VALUE | rb_cString
VALUE | rb_cStruct
VALUE | rb_cSymbol
VALUE | rb_cThread
VALUE | rb_cTime
VALUE | rb_cTrueClass
| TrueClass class. More...
VALUE | rb_cUnboundMethod
VALUE | rb_eException
VALUE | rb_eStandardError
VALUE | rb_eSystemExit
VALUE | rb_eInterrupt
VALUE | rb_eSignal
VALUE | rb_eFatal
VALUE | rb_eArgError
VALUE | rb_eEOFError
VALUE | rb_eIndexError
VALUE | rb_eStopIteration
VALUE | rb_eKeyError
VALUE | rb_eRangeError
VALUE | rb_eIOError
VALUE | rb_eRuntimeError
VALUE | rb_eFrozenError
VALUE | rb_eSecurityError
VALUE | rb_eSystemCallError
VALUE | rb_eThreadError
VALUE | rb_eTypeError
VALUE | rb_eZeroDivError
VALUE | rb_eNotImpError
VALUE | rb_eNoMemError
VALUE | rb_eNoMethodError
VALUE | rb_eFloatDomainError
VALUE | rb_eLocalJumpError
VALUE | rb_eSysStackError
VALUE | rb_eRegexpError
VALUE | rb_eEncodingError
VALUE | rb_eEncCompatError
VALUE | rb_eNoMatchingPatternError
VALUE | rb_eScriptError
VALUE | rb_eNameError
VALUE | rb_eSyntaxError
VALUE | rb_eLoadError
VALUE | rb_eMathDomainError
VALUE | rb_stdin
VALUE | rb_stdout
VALUE | rb_stderr

## Detailed Description

Ruby-level global variables / constants, visible from C.

Author
  Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org

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.

Warning
  Symbols prefixed with either `RBIMPL` or `rbimpl` are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will.

Note
  To ruby-core: remember that this header can be possibly recursively included from extension libraries written in C++. Do not expect for instance `__VA_ARGS__` is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98.

Definition in file globals.h.

## Macro Definition Documentation

## ◆ CLASS_OF

#define CLASS_OF rb_class_of

Definition at line 153 of file globals.h.

## ◆ RUBY_INTEGER_UNIFICATION

#define RUBY_INTEGER_UNIFICATION 1

Definition at line 32 of file globals.h.

## Variable Documentation

## ◆ rb_cArray

VALUE rb_cArray
| extern

Definition at line 40 of file array.c.

Referenced by Init_Array(), Init_vm_backtrace(), rb_ary_new_capa(), rb_ary_new_from_values(), rb_ary_resurrect(), rb_ary_sort_bang(), rb_ary_subseq_step(), rb_ec_ary_new_from_values(), and rb_nmin_run().

## ◆ rb_cBinding

VALUE rb_cBinding
| extern

Definition at line 45 of file proc.c.

Referenced by Init_Binding(), and rb_vm_make_binding().

## ◆ rb_cComplex

VALUE rb_cComplex
| extern

Definition at line 44 of file complex.c.

Referenced by imp1(), Init_Complex(), rb_Complex(), rb_complex_new(), rb_complex_new_polar(), and rb_complex_raw().

## ◆ rb_cDir

VALUE rb_cDir
| extern

Definition at line 450 of file dir.c.

Referenced by Init_Dir().

## ◆ rb_cEncoding

VALUE rb_cEncoding
| extern

Definition at line 57 of file encoding.c.

Referenced by Init_Encoding(), Init_Exception(), and InitVM_transcode().

## ◆ rb_cEnumerator

VALUE rb_cEnumerator
| extern

Definition at line 126 of file enumerator.c.

Referenced by InitVM_Enumerator(), rb_enumeratorize_with_size(), and rb_enumeratorize_with_size_kw().

## ◆ rb_cFile

VALUE rb_cFile
| extern

Definition at line 174 of file file.c.

Referenced by Init_Dir(), Init_File(), Init_IO(), rb_file_open(), rb_file_open_str(), and rb_io_fdopen().

## ◆ rb_cFloat

VALUE rb_cFloat
| extern

Definition at line 190 of file numeric.c.

Referenced by Init_Complex(), Init_Numeric(), Init_Rational(), and rb_float_new_in_heap().

## ◆ rb_cHash

VALUE rb_cHash
| extern

Definition at line 106 of file hash.c.

Referenced by Init_Hash(), rb_extract_keywords(), rb_hash_new(), and rb_hash_resurrect().

## ◆ rb_cInteger

VALUE rb_cInteger
| extern

Definition at line 191 of file numeric.c.

Referenced by Init_Bignum(), Init_Numeric(), Init_Rational(), rb_big_isqrt(), and rb_num_to_dbl().

## ◆ rb_cIO

VALUE rb_cIO
| extern

Definition at line 183 of file io.c.

Referenced by Init_etc(), Init_File(), Init_IO(), Init_nonblock(), Init_ossl_ssl(), Init_stringio(), Init_wait(), InitVM_console(), rb_io_fdopen(), rb_io_prep_stderr(), rb_io_prep_stdin(), rb_io_prep_stdout(), and rsock_init_basicsocket().

## ◆ rb_cMatch

VALUE rb_cMatch
| extern

Definition at line 940 of file re.c.

Referenced by Init_Regexp(), rb_backref_set_string(), and rb_reg_start_with_p().

## ◆ rb_cMethod

VALUE rb_cMethod
| extern

Definition at line 44 of file proc.c.

Referenced by Init_Proc(), and rb_obj_singleton_method().

## ◆ rb_cNumeric

VALUE rb_cNumeric
| extern

Definition at line 189 of file numeric.c.

Referenced by Init_bigdecimal(), Init_Complex(), Init_Numeric(), Init_Rational(), rb_check_to_float(), and rb_node_case_when_optimizable_literal().

## ◆ rb_cProc

VALUE rb_cProc
| extern

Definition at line 46 of file proc.c.

Referenced by Init_Proc(), rb_block_lambda(), rb_block_proc(), rb_func_lambda_new(), rb_func_proc_new(), rb_proc_dup(), rb_sym_to_proc(), and rb_vm_bh_to_procval().

## ◆ rb_cRandom

VALUE rb_cRandom
| extern

Definition at line 226 of file random.c.

Referenced by InitVM_Random().

## ◆ rb_cRange

VALUE rb_cRange
| extern

Definition at line 31 of file range.c.

Referenced by Init_Range(), rb_range_new(), and rb_range_values().

## ◆ rb_cRational

VALUE rb_cRational
| extern

Definition at line 43 of file rational.c.

Referenced by Init_Rational(), rb_num_to_dbl(), rb_Rational(), rb_rational_new(), and rb_rational_raw().

## ◆ rb_cRegexp

VALUE rb_cRegexp
| extern

Definition at line 2301 of file re.c.

Referenced by Init_Regexp(), and rb_reg_alloc().

## ◆ rb_cStat

VALUE rb_cStat
| extern

Definition at line 176 of file file.c.

Referenced by Init_File(), and rb_stat_new().

## ◆ rb_cString

VALUE rb_cString
| extern

Definition at line 80 of file string.c.

Referenced by Init_Complex(), Init_Exception(), Init_Rational(), Init_String(), InitVM_transcode(), rb_ec_str_resurrect(), rb_enc_str_new(), rb_enc_str_new_static(), rb_enc_vsprintf(), rb_hash_aset(), rb_hash_key_str(), rb_str_buf_new(), rb_str_new(), rb_str_new_static(), rb_str_opt_plus(), rb_str_plus(), rb_str_resurrect(), rb_str_times(), rb_str_upto_each(), rb_str_upto_endless_each(), rb_sym_to_s(), rb_usascii_str_new_static(), rb_utf8_str_new(), and rb_utf8_str_new_static().

## ◆ rb_cStruct

VALUE rb_cStruct
| extern

Definition at line 34 of file struct.c.

Referenced by Init_etc(), InitVM_Struct(), rb_struct_define(), and rb_struct_define_under().

## ◆ rb_cSymbol

VALUE rb_cSymbol
| extern

Definition at line 81 of file string.c.

Referenced by Init_String(), and rb_str_intern().

## ◆ rb_cThread

VALUE rb_cThread
| extern

Definition at line 374 of file vm.c.

Referenced by Init_Thread(), Init_VM(), Init_vm_backtrace(), Init_vm_trace(), InitVM_process(), rb_thread_create(), and rb_thread_create_ractor().

## ◆ rb_cTime

VALUE rb_cTime
| extern

Definition at line 645 of file time.c.

Referenced by asn1time_to_time(), Init_date_core(), Init_Time(), ole_val2variant(), rb_time_nano_new(), rb_time_new(), rb_time_num_new(), and rb_time_timespec_new().

## ◆ rb_cUnboundMethod

VALUE rb_cUnboundMethod
| extern

Definition at line 43 of file proc.c.

Referenced by Init_Proc().

## ◆ rb_eEOFError

VALUE rb_eEOFError
| extern

Definition at line 184 of file io.c.

Referenced by Init_IO(), and rb_eof_error().

## ◆ rb_eFloatDomainError

VALUE rb_eFloatDomainError
| extern

Definition at line 194 of file numeric.c.

Referenced by Init_Numeric(), rb_cstr_to_rat(), and VpException().

## ◆ rb_eIOError

VALUE rb_eIOError
| extern

Definition at line 185 of file io.c.

Referenced by Init_IO(), Init_Thread(), rb_io_check_byte_readable(), rb_io_check_char_readable(), rb_io_check_initialized(), rb_io_check_writable(), rb_io_ungetc(), rsock_s_recvfrom(), and rsock_s_recvfrom_nonblock().

## ◆ rb_eLocalJumpError

VALUE rb_eLocalJumpError
| extern

Definition at line 48 of file eval.c.

Referenced by Init_Proc().

## ◆ rb_eMathDomainError

VALUE rb_eMathDomainError
| extern

Definition at line 37 of file math.c.

Referenced by exp2().

## ◆ rb_eRegexpError

VALUE rb_eRegexpError
| extern

Definition at line 28 of file re.c.

Referenced by Init_Regexp().

## ◆ rb_eStopIteration

VALUE rb_eStopIteration
| extern

Definition at line 141 of file enumerator.c.

Referenced by Init_Ractor(), and InitVM_Enumerator().

## ◆ rb_eSysStackError

VALUE rb_eSysStackError
| extern

Definition at line 49 of file eval.c.

Referenced by Init_Proc().

## ◆ rb_eThreadError

VALUE rb_eThreadError
| extern

Definition at line 953 of file eval.c.

Referenced by Init_Thread(), rb_mutex_unlock(), rb_thread_stop(), and rb_thread_wakeup().

## ◆ rb_eZeroDivError

VALUE rb_eZeroDivError
| extern

Definition at line 193 of file numeric.c.

Referenced by Init_Numeric(), and rb_num_zerodiv().

## ◆ rb_mComparable

VALUE rb_mComparable
| extern

Definition at line 19 of file compar.c.

Referenced by Init_Comparable(), Init_Complex(), Init_date_core(), Init_File(), Init_Numeric(), Init_ossl_x509name(), Init_String(), and Init_Time().

## ◆ rb_mEnumerable

VALUE rb_mEnumerable
| extern

Definition at line 27 of file enum.c.

Referenced by Init_Array(), Init_dbm(), Init_Dir(), Init_Enumerable(), Init_etc(), Init_GC(), Init_gdbm(), Init_Hash(), Init_IO(), Init_ossl_asn1(), Init_Range(), Init_readline(), Init_stringio(), Init_zlib(), InitVM_Enumerator(), and InitVM_Struct().

## ◆ rb_mFileTest

VALUE rb_mFileTest
| extern

Definition at line 175 of file file.c.

Referenced by Init_File().

## ◆ rb_mGC

VALUE rb_mGC
| extern

Definition at line 981 of file gc.c.

Referenced by Init_GC().

## ◆ rb_mMath

VALUE rb_mMath
| extern

Definition at line 36 of file math.c.

Referenced by exp2().

## ◆ rb_mProcess

VALUE rb_mProcess
| extern

Definition at line 8608 of file process.c.

Referenced by InitVM_process(), and ruby_prog_init().

## ◆ rb_mWaitReadable

VALUE rb_mWaitReadable
| extern

Definition at line 186 of file io.c.

Referenced by Init_IO(), Init_ossl_ssl(), and rb_readwrite_syserr_fail().

## ◆ rb_mWaitWritable

VALUE rb_mWaitWritable
| extern

Definition at line 187 of file io.c.

Referenced by Init_IO(), Init_ossl_ssl(), and rb_readwrite_syserr_fail().

## ◆ rb_stderr

VALUE rb_stderr

Definition at line 118 of file globals.h.

Referenced by rb_ractor_stderr(), and rb_ractor_stderr_set().

## ◆ rb_stdin

VALUE rb_stdin
| extern

Definition at line 196 of file io.c.

Referenced by Init_IO(), rb_ractor_stdin(), rb_ractor_stdin_set(), and rb_stdio_set_default_encoding().

## ◆ rb_stdout

VALUE rb_stdout

Definition at line 118 of file globals.h.

Referenced by rb_ractor_stdout(), and rb_ractor_stdout_set().