(892c46283a5ea4179500d951c9d4866c0051f27b)
Defines VALUE and ID.
More...
#include "ruby/internal/static_assert.h"
#include "ruby/backward/2/long_long.h"
#include "ruby/backward/2/limits.h"
Go to the source code of this file.
|
typedef uintptr_t | VALUE |
| Type that represents a Ruby object. More...
|
|
typedef uintptr_t | ID |
| Type that represents a Ruby identifier such as a variable name. More...
|
|
typedef intptr_t | SIGNED_VALUE |
| A signed integer type that has the same width with VALUE. More...
|
|
Defines VALUE and ID.
- 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 value.h.
◆ RBIMPL_VALUE_FULL
#define RBIMPL_VALUE_FULL UINTPTR_MAX |
Maximum possible value that a VALUE can take.
Definition at line 90 of file value.h.
◆ RBIMPL_VALUE_NULL
#define RBIMPL_VALUE_NULL UINTPTR_C(0) |
A compile-time constant of type VALUE whose value is 0.
Definition at line 76 of file value.h.
◆ RBIMPL_VALUE_ONE
#define RBIMPL_VALUE_ONE UINTPTR_C(1) |
A compile-time constant of type VALUE whose value is 1.
Definition at line 83 of file value.h.
◆ SIZEOF_VALUE
#define SIZEOF_VALUE SIZEOF_UINTPTR_T |
Identical to sizeof(VALUE)
, except it is a macro that can also be used inside of preprocessor directives such as #if
.
Handy on occasions.
Definition at line 69 of file value.h.
◆ ID
Type that represents a Ruby identifier such as a variable name.
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
ID rb_intern(const char *name)
Finds or creates a symbol of the given name.
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
uintptr_t VALUE
Type that represents a Ruby object.
- Note
- rb_cSymbol is a Ruby-level data type for the same thing.
Definition at line 52 of file value.h.
◆ SIGNED_VALUE
A signed integer type that has the same width with VALUE.
Definition at line 63 of file value.h.
◆ VALUE
Type that represents a Ruby object.
It is an unsigned integer of some kind, depending on platforms.
VALUE rb_eval_string(const char *str)
Evaluates the given string.
- Warning
- VALUE is not a pointer.
-
VALUE can be wider than
long
.
Definition at line 40 of file value.h.