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

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

Macros | Enumerations
special_consts.h File Reference

Defines enum ruby_special_consts. More...

`#include "ruby/internal/attr/artificial.h"`
`#include "ruby/internal/attr/const.h"`
`#include "ruby/internal/attr/constexpr.h"`
`#include "ruby/internal/attr/enum_extensibility.h"`
`#include "ruby/internal/stdbool.h"`
`#include "ruby/internal/value.h"`

Go to the source code of this file.

## Macros
#define | USE_FLONUM 1
#define | RTEST RB_TEST
#define | FIXNUM_P RB_FIXNUM_P
#define | IMMEDIATE_P RB_IMMEDIATE_P
#define | NIL_P RB_NIL_P
#define | SPECIAL_CONST_P RB_SPECIAL_CONST_P
#define | STATIC_SYM_P RB_STATIC_SYM_P
#define | Qfalse RUBY_Qfalse
#define | Qnil RUBY_Qnil
#define | Qtrue RUBY_Qtrue
#define | Qundef RUBY_Qundef

## Enumerations
enum | ruby_special_consts { RUBY_Qfalse = 0x00 , RUBY_Qtrue = 0x02 , RUBY_Qnil = 0x04 , RUBY_Qundef = 0x06 , RUBY_IMMEDIATE_MASK = 0x03 , RUBY_FIXNUM_FLAG = 0x01 , RUBY_FLONUM_MASK = 0x00 , RUBY_FLONUM_FLAG = 0x02 , RUBY_SYMBOL_FLAG = 0x0e , RUBY_SPECIAL_SHIFT = 8 }
| special constants - i.e. More...

## Detailed Description

Defines enum ruby_special_consts.

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.

See also
  Sasada, K., "A Lighweight Representation of Floting-Point Numbers on Ruby Interpreter", in proceedings of 10th JSSST SIGPPL Workshop on Programming and Programming Languages (PPL2008), pp. 9-16, 2008.

Definition in file special_consts.h.

## Macro Definition Documentation

## ◆ FIXNUM_P

#define FIXNUM_P RB_FIXNUM_P

Definition at line 44 of file special_consts.h.

## ◆ IMMEDIATE_P

#define IMMEDIATE_P RB_IMMEDIATE_P

Definition at line 45 of file special_consts.h.

## ◆ NIL_P

#define NIL_P RB_NIL_P

Definition at line 46 of file special_consts.h.

## ◆ Qfalse

#define Qfalse RUBY_Qfalse

Definition at line 50 of file special_consts.h.

## ◆ Qnil

#define Qnil RUBY_Qnil

Definition at line 51 of file special_consts.h.

## ◆ Qtrue

#define Qtrue RUBY_Qtrue

Definition at line 52 of file special_consts.h.

## ◆ Qundef

#define Qundef RUBY_Qundef

Definition at line 53 of file special_consts.h.

## ◆ RTEST

#define RTEST RB_TEST

Definition at line 42 of file special_consts.h.

## ◆ SPECIAL_CONST_P

#define SPECIAL_CONST_P RB_SPECIAL_CONST_P

Definition at line 47 of file special_consts.h.

## ◆ STATIC_SYM_P

#define STATIC_SYM_P RB_STATIC_SYM_P

Definition at line 48 of file special_consts.h.

## ◆ USE_FLONUM

#define USE_FLONUM 1

Definition at line 37 of file special_consts.h.

## Enumeration Type Documentation

## ◆ ruby_special_consts

enum ruby_special_consts

special constants - i.e.

non-zero and non-fixnum constants

Enumerator
RUBY_Qfalse |
RUBY_Qtrue |
RUBY_Qnil |
RUBY_Qundef |
RUBY_IMMEDIATE_MASK |
RUBY_FIXNUM_FLAG |
RUBY_FLONUM_MASK |
RUBY_FLONUM_FLAG |
RUBY_SYMBOL_FLAG |
RUBY_SPECIAL_SHIFT |

Definition at line 73 of file special_consts.h.