1#ifndef EXTERNAL_VALUE_H
2#define EXTERNAL_VALUE_H
4#include "ruby/config.h"
6#if defined(__DOXYGEN__)
19typedef uintptr_t
VALUE;
48#define SIZEOF_VALUE SIZEOF_UINTPTR_T
55#define RBIMPL_VALUE_NULL UINTPTR_C(0)
62#define RBIMPL_VALUE_ONE UINTPTR_C(1)
69#define RBIMPL_VALUE_FULL UINTPTR_MAX
71#elif defined HAVE_UINTPTR_T && 0
72typedef uintptr_t
VALUE;
74# define SIGNED_VALUE intptr_t
75# define SIZEOF_VALUE SIZEOF_UINTPTR_T
76# undef PRI_VALUE_PREFIX
77# define RBIMPL_VALUE_NULL UINTPTR_C(0)
78# define RBIMPL_VALUE_ONE UINTPTR_C(1)
79# define RBIMPL_VALUE_FULL UINTPTR_MAX
81#elif SIZEOF_LONG == SIZEOF_VOIDP
82typedef unsigned long VALUE;
83typedef unsigned long ID;
84# define SIGNED_VALUE long
85# define SIZEOF_VALUE SIZEOF_LONG
86# define PRI_VALUE_PREFIX "l"
87# define RBIMPL_VALUE_NULL 0UL
88# define RBIMPL_VALUE_ONE 1UL
89# define RBIMPL_VALUE_FULL ULONG_MAX
91#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
94# define SIGNED_VALUE LONG_LONG
95# define LONG_LONG_VALUE 1
96# define SIZEOF_VALUE SIZEOF_LONG_LONG
97# define PRI_VALUE_PREFIX PRI_LL_PREFIX
98# define RBIMPL_VALUE_NULL 0ULL
99# define RBIMPL_VALUE_ONE 1ULL
100# define RBIMPL_VALUE_FULL ULLONG_MAX
103# error ---->> ruby requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<----
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.