25#include "ruby/backward/2/limits.h"
27#if defined(__DOXYGEN__)
69#define SIZEOF_VALUE SIZEOF_UINTPTR_T
76#define RBIMPL_VALUE_NULL UINTPTR_C(0)
83#define RBIMPL_VALUE_ONE UINTPTR_C(1)
90#define RBIMPL_VALUE_FULL UINTPTR_MAX
92#elif defined HAVE_UINTPTR_T && 0
93typedef uintptr_t
VALUE;
95# define SIGNED_VALUE intptr_t
96# define SIZEOF_VALUE SIZEOF_UINTPTR_T
97# undef PRI_VALUE_PREFIX
98# define RBIMPL_VALUE_NULL UINTPTR_C(0)
99# define RBIMPL_VALUE_ONE UINTPTR_C(1)
100# define RBIMPL_VALUE_FULL UINTPTR_MAX
102#elif SIZEOF_LONG == SIZEOF_VOIDP
103typedef unsigned long VALUE;
104typedef unsigned long ID;
105# define SIGNED_VALUE long
106# define SIZEOF_VALUE SIZEOF_LONG
107# define PRI_VALUE_PREFIX "l"
108# define RBIMPL_VALUE_NULL 0UL
109# define RBIMPL_VALUE_ONE 1UL
110# define RBIMPL_VALUE_FULL ULONG_MAX
112#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
115# define SIGNED_VALUE LONG_LONG
116# define LONG_LONG_VALUE 1
117# define SIZEOF_VALUE SIZEOF_LONG_LONG
118# define PRI_VALUE_PREFIX PRI_LL_PREFIX
119# define RBIMPL_VALUE_NULL 0ULL
120# define RBIMPL_VALUE_ONE 1ULL
121# define RBIMPL_VALUE_FULL ULLONG_MAX
124# error ---->> ruby requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<----
Defines RBIMPL_STATIC_ASSERT.
#define RBIMPL_STATIC_ASSERT
Wraps (or simulates) static_assert
intptr_t SIGNED_VALUE
A signed integer type that has the same width with VALUE.
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
uintptr_t VALUE
Type that represents a Ruby object.