Ruby: include/ruby/internal/fl_type.h Source File

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

fl_type.h
Go to the documentation of this file.
1#ifndef RBIMPL_FL_TYPE_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_FL_TYPE_H
23#include "ruby/internal/config.h" /* for ENUM_OVER_INT */
24#include "ruby/internal/attr/artificial.h"
25#include "ruby/internal/attr/flag_enum.h"
26#include "ruby/internal/attr/forceinline.h"
27#include "ruby/internal/attr/noalias.h"
28#include "ruby/internal/attr/pure.h"
29#include "ruby/internal/cast.h"
30#include "ruby/internal/core/rbasic.h"
31#include "ruby/internal/dllexport.h"
32#include "ruby/internal/special_consts.h"
33#include "ruby/internal/stdbool.h"
34#include "ruby/internal/value.h"
35#include "ruby/internal/value_type.h"
36#include "ruby/assert.h"
37#include "ruby/defines.h"
38
40#ifdef ENUM_OVER_INT
41# define RBIMPL_WIDER_ENUM 1
42#elif SIZEOF_INT * CHAR_BIT > 12+19+1
43# define RBIMPL_WIDER_ENUM 1
44#else
45# define RBIMPL_WIDER_ENUM 0
46#endif
49#define FL_SINGLETON RBIMPL_CAST((VALUE)RUBY_FL_SINGLETON)
50#define FL_WB_PROTECTED RBIMPL_CAST((VALUE)RUBY_FL_WB_PROTECTED)
51#define FL_PROMOTED0 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED0)
52#define FL_PROMOTED1 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED1)
53#define FL_FINALIZE RBIMPL_CAST((VALUE)RUBY_FL_FINALIZE)
54#define FL_TAINT RBIMPL_CAST((VALUE)RUBY_FL_TAINT)
55#define FL_SHAREABLE RBIMPL_CAST((VALUE)RUBY_FL_SHAREABLE)
56#define FL_UNTRUSTED RBIMPL_CAST((VALUE)RUBY_FL_UNTRUSTED)
57#define FL_SEEN_OBJ_ID RBIMPL_CAST((VALUE)RUBY_FL_SEEN_OBJ_ID)
58#define FL_EXIVAR RBIMPL_CAST((VALUE)RUBY_FL_EXIVAR)
59#define FL_FREEZE RBIMPL_CAST((VALUE)RUBY_FL_FREEZE)
60
61#define FL_USHIFT RBIMPL_CAST((VALUE)RUBY_FL_USHIFT)
62
63#define FL_USER0 RBIMPL_CAST((VALUE)RUBY_FL_USER0)
64#define FL_USER1 RBIMPL_CAST((VALUE)RUBY_FL_USER1)
65#define FL_USER2 RBIMPL_CAST((VALUE)RUBY_FL_USER2)
66#define FL_USER3 RBIMPL_CAST((VALUE)RUBY_FL_USER3)
67#define FL_USER4 RBIMPL_CAST((VALUE)RUBY_FL_USER4)
68#define FL_USER5 RBIMPL_CAST((VALUE)RUBY_FL_USER5)
69#define FL_USER6 RBIMPL_CAST((VALUE)RUBY_FL_USER6)
70#define FL_USER7 RBIMPL_CAST((VALUE)RUBY_FL_USER7)
71#define FL_USER8 RBIMPL_CAST((VALUE)RUBY_FL_USER8)
72#define FL_USER9 RBIMPL_CAST((VALUE)RUBY_FL_USER9)
73#define FL_USER10 RBIMPL_CAST((VALUE)RUBY_FL_USER10)
74#define FL_USER11 RBIMPL_CAST((VALUE)RUBY_FL_USER11)
75#define FL_USER12 RBIMPL_CAST((VALUE)RUBY_FL_USER12)
76#define FL_USER13 RBIMPL_CAST((VALUE)RUBY_FL_USER13)
77#define FL_USER14 RBIMPL_CAST((VALUE)RUBY_FL_USER14)
78#define FL_USER15 RBIMPL_CAST((VALUE)RUBY_FL_USER15)
79#define FL_USER16 RBIMPL_CAST((VALUE)RUBY_FL_USER16)
80#define FL_USER17 RBIMPL_CAST((VALUE)RUBY_FL_USER17)
81#define FL_USER18 RBIMPL_CAST((VALUE)RUBY_FL_USER18)
82#define FL_USER19 RBIMPL_CAST((VALUE)(unsigned int)RUBY_FL_USER19)
83
84#define ELTS_SHARED RUBY_ELTS_SHARED
85#define RUBY_ELTS_SHARED RUBY_ELTS_SHARED
86#define RB_OBJ_FREEZE rb_obj_freeze_inline
87
89#define RB_FL_ABLE RB_FL_ABLE
90#define RB_FL_ALL RB_FL_ALL
91#define RB_FL_ALL_RAW RB_FL_ALL_RAW
92#define RB_FL_ANY RB_FL_ANY
93#define RB_FL_ANY_RAW RB_FL_ANY_RAW
94#define RB_FL_REVERSE RB_FL_REVERSE
95#define RB_FL_REVERSE_RAW RB_FL_REVERSE_RAW
96#define RB_FL_SET RB_FL_SET
97#define RB_FL_SET_RAW RB_FL_SET_RAW
98#define RB_FL_TEST RB_FL_TEST
99#define RB_FL_TEST_RAW RB_FL_TEST_RAW
100#define RB_FL_UNSET RB_FL_UNSET
101#define RB_FL_UNSET_RAW RB_FL_UNSET_RAW
102#define RB_OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW
103#define RB_OBJ_FROZEN RB_OBJ_FROZEN
104#define RB_OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW
105#define RB_OBJ_INFECT RB_OBJ_INFECT
106#define RB_OBJ_INFECT_RAW RB_OBJ_INFECT_RAW
107#define RB_OBJ_TAINT RB_OBJ_TAINT
108#define RB_OBJ_TAINTABLE RB_OBJ_TAINTABLE
109#define RB_OBJ_TAINTED RB_OBJ_TAINTED
110#define RB_OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW
111#define RB_OBJ_TAINT_RAW RB_OBJ_TAINT_RAW
112#define RB_OBJ_UNTRUST RB_OBJ_UNTRUST
113#define RB_OBJ_UNTRUSTED RB_OBJ_UNTRUSTED
121#define FL_ABLE RB_FL_ABLE
122#define FL_ALL RB_FL_ALL
123#define FL_ALL_RAW RB_FL_ALL_RAW
124#define FL_ANY RB_FL_ANY
125#define FL_ANY_RAW RB_FL_ANY_RAW
126#define FL_REVERSE RB_FL_REVERSE
127#define FL_REVERSE_RAW RB_FL_REVERSE_RAW
128#define FL_SET RB_FL_SET
129#define FL_SET_RAW RB_FL_SET_RAW
130#define FL_TEST RB_FL_TEST
131#define FL_TEST_RAW RB_FL_TEST_RAW
132#define FL_UNSET RB_FL_UNSET
133#define FL_UNSET_RAW RB_FL_UNSET_RAW
134#define OBJ_FREEZE RB_OBJ_FREEZE
135#define OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW
136#define OBJ_FROZEN RB_OBJ_FROZEN
137#define OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW
138#define OBJ_INFECT RB_OBJ_INFECT
139#define OBJ_INFECT_RAW RB_OBJ_INFECT_RAW
140#define OBJ_TAINT RB_OBJ_TAINT
141#define OBJ_TAINTABLE RB_OBJ_TAINTABLE
142#define OBJ_TAINTED RB_OBJ_TAINTED
143#define OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW
144#define OBJ_TAINT_RAW RB_OBJ_TAINT_RAW
145#define OBJ_UNTRUST RB_OBJ_UNTRUST
146#define OBJ_UNTRUSTED RB_OBJ_UNTRUSTED
149/* This is an enum because GDB wants it (rather than a macro) */
150 enum ruby_fl_ushift { RUBY_FL_USHIFT = 12 };
151
152/* > The expression that defines the value of an enumeration constant shall be
153 * > an integer constant expression that has a value representable as an `int`.
154 *
155 * -- ISO/IEC 9899:2018 section 6.7.2.2
156 *
157 * So ENUM_OVER_INT situation is an extension to the standard. Note however
158 * that we do not support 16 bit `int` environment. */
159 RB_GNUC_EXTENSION
160 enum
161 RBIMPL_ATTR_FLAG_ENUM()
162 ruby_fl_type {
163 RUBY_FL_WB_PROTECTED = (1<<5),
164 RUBY_FL_PROMOTED0 = (1<<5),
165 RUBY_FL_PROMOTED1 = (1<<6),
166 RUBY_FL_PROMOTED = RUBY_FL_PROMOTED0 | RUBY_FL_PROMOTED1,
167 RUBY_FL_FINALIZE = (1<<7),
168 RUBY_FL_TAINT = (1<<8),
169 RUBY_FL_SHAREABLE = (1<<8),
170 RUBY_FL_UNTRUSTED = RUBY_FL_TAINT,
171 RUBY_FL_SEEN_OBJ_ID = (1<<9),
172 RUBY_FL_EXIVAR = (1<<10),
173 RUBY_FL_FREEZE = (1<<11),
174
175#define RBIMPL_FL_USER_N(n) RUBY_FL_USER##n = (1<<(RUBY_FL_USHIFT+n))
176 RBIMPL_FL_USER_N(0),
177 RBIMPL_FL_USER_N(1),
178 RBIMPL_FL_USER_N(2),
179 RBIMPL_FL_USER_N(3),
180 RBIMPL_FL_USER_N(4),
181 RBIMPL_FL_USER_N(5),
182 RBIMPL_FL_USER_N(6),
183 RBIMPL_FL_USER_N(7),
184 RBIMPL_FL_USER_N(8),
185 RBIMPL_FL_USER_N(9),
186 RBIMPL_FL_USER_N(10),
187 RBIMPL_FL_USER_N(11),
188 RBIMPL_FL_USER_N(12),
189 RBIMPL_FL_USER_N(13),
190 RBIMPL_FL_USER_N(14),
191 RBIMPL_FL_USER_N(15),
192 RBIMPL_FL_USER_N(16),
193 RBIMPL_FL_USER_N(17),
194 RBIMPL_FL_USER_N(18),
195#if ENUM_OVER_INT
196 RBIMPL_FL_USER_N(19),
197#else
198# define RUBY_FL_USER19 (RBIMPL_VALUE_ONE<<(RUBY_FL_USHIFT+19))
199#endif
200#undef RBIMPL_FL_USER_N
201#undef RBIMPL_WIDER_ENUM
202
203 RUBY_ELTS_SHARED = RUBY_FL_USER2,
204 RUBY_FL_SINGLETON = RUBY_FL_USER0,
205};
206
207 enum { RUBY_FL_DUPPED = RUBY_T_MASK | RUBY_FL_EXIVAR | RUBY_FL_TAINT };
208
209 RBIMPL_SYMBOL_EXPORT_BEGIN()
210void rb_obj_infect(VALUE victim, VALUE carrier);
211void rb_freeze_singleton_class(VALUE klass);
212 RBIMPL_SYMBOL_EXPORT_END()
213
214 RBIMPL_ATTR_PURE_UNLESS_DEBUG()
215 RBIMPL_ATTR_ARTIFICIAL()
216 RBIMPL_ATTR_FORCEINLINE()
217static bool
218RB_FL_ABLE(VALUE obj)
219{
220 if (RB_SPECIAL_CONST_P(obj)) {
221 return false;
222 }
223 else if (RB_TYPE_P(obj, RUBY_T_NODE)) {
224 return false;
225 }
226 else {
227 return true;
228 }
229}
230
231 RBIMPL_ATTR_PURE_UNLESS_DEBUG()
232 RBIMPL_ATTR_ARTIFICIAL()
233static inline VALUE
234RB_FL_TEST_RAW(VALUE obj, VALUE flags)
235{
236 RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
237 return RBASIC(obj)->flags & flags;
238}
239
240 RBIMPL_ATTR_PURE_UNLESS_DEBUG()
241 RBIMPL_ATTR_ARTIFICIAL()
242static inline VALUE
243RB_FL_TEST(VALUE obj, VALUE flags)
244{
245 if (RB_FL_ABLE(obj)) {
246 return RB_FL_TEST_RAW(obj, flags);
247 }
248 else {
249 return RBIMPL_VALUE_NULL;
250 }
251}
252
253 RBIMPL_ATTR_PURE_UNLESS_DEBUG()
254 RBIMPL_ATTR_ARTIFICIAL()
255static inline bool
256RB_FL_ANY_RAW(VALUE obj, VALUE flags)
257{
258 return RB_FL_TEST_RAW(obj, flags);
259}
260
261 RBIMPL_ATTR_PURE_UNLESS_DEBUG()
262 RBIMPL_ATTR_ARTIFICIAL()
263static inline bool
264RB_FL_ANY(VALUE obj, VALUE flags)
265{
266 return RB_FL_TEST(obj, flags);
267}
268
269 RBIMPL_ATTR_PURE_UNLESS_DEBUG()
270 RBIMPL_ATTR_ARTIFICIAL()
271static inline bool
272RB_FL_ALL_RAW(VALUE obj, VALUE flags)
273{
274 return RB_FL_TEST_RAW(obj, flags) == flags;
275}
276
277 RBIMPL_ATTR_PURE_UNLESS_DEBUG()
278 RBIMPL_ATTR_ARTIFICIAL()
279static inline bool
280RB_FL_ALL(VALUE obj, VALUE flags)
281{
282 return RB_FL_TEST(obj, flags) == flags;
283}
284
285 RBIMPL_ATTR_NOALIAS()
286 RBIMPL_ATTR_ARTIFICIAL()
287static inline void
288rbimpl_fl_set_raw_raw(struct RBasic *obj, VALUE flags)
289{
290 obj->flags |= flags;
291}
292
293 RBIMPL_ATTR_ARTIFICIAL()
294static inline void
295RB_FL_SET_RAW(VALUE obj, VALUE flags)
296{
297 RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
298 rbimpl_fl_set_raw_raw(RBASIC(obj), flags);
299}
300
301 RBIMPL_ATTR_ARTIFICIAL()
302static inline void
303RB_FL_SET(VALUE obj, VALUE flags)
304{
305 if (RB_FL_ABLE(obj)) {
306 RB_FL_SET_RAW(obj, flags);
307 }
308}
309
310 RBIMPL_ATTR_NOALIAS()
311 RBIMPL_ATTR_ARTIFICIAL()
312static inline void
313rbimpl_fl_unset_raw_raw(struct RBasic *obj, VALUE flags)
314{
315 obj->flags &= ~flags;
316}
317
318 RBIMPL_ATTR_ARTIFICIAL()
319static inline void
320RB_FL_UNSET_RAW(VALUE obj, VALUE flags)
321{
322 RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
323 rbimpl_fl_unset_raw_raw(RBASIC(obj), flags);
324}
325
326 RBIMPL_ATTR_ARTIFICIAL()
327static inline void
328RB_FL_UNSET(VALUE obj, VALUE flags)
329{
330 if (RB_FL_ABLE(obj)) {
331 RB_FL_UNSET_RAW(obj, flags);
332 }
333}
334
335 RBIMPL_ATTR_NOALIAS()
336 RBIMPL_ATTR_ARTIFICIAL()
337static inline void
338rbimpl_fl_reverse_raw_raw(struct RBasic *obj, VALUE flags)
339{
340 obj->flags ^= flags;
341}
342
343 RBIMPL_ATTR_ARTIFICIAL()
344static inline void
345RB_FL_REVERSE_RAW(VALUE obj, VALUE flags)
346{
347 RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
348 rbimpl_fl_reverse_raw_raw(RBASIC(obj), flags);
349}
350
351 RBIMPL_ATTR_ARTIFICIAL()
352static inline void
353RB_FL_REVERSE(VALUE obj, VALUE flags)
354{
355 if (RB_FL_ABLE(obj)) {
356 RB_FL_REVERSE_RAW(obj, flags);
357 }
358}
359
360 RBIMPL_ATTR_PURE_UNLESS_DEBUG()
361 RBIMPL_ATTR_ARTIFICIAL()
362static inline bool
363RB_OBJ_TAINTABLE(VALUE obj)
364{
365 if (! RB_FL_ABLE(obj)) {
366 return false;
367 }
368 else if (RB_TYPE_P(obj, RUBY_T_BIGNUM)) {
369 return false;
370 }
371 else if (RB_TYPE_P(obj, RUBY_T_FLOAT)) {
372 return false;
373 }
374 else {
375 return true;
376 }
377}
378
379 RBIMPL_ATTR_PURE_UNLESS_DEBUG()
380 RBIMPL_ATTR_ARTIFICIAL()
381static inline VALUE
382RB_OBJ_TAINTED_RAW(VALUE obj)
383{
384 return RB_FL_TEST_RAW(obj, RUBY_FL_TAINT);
385}
386
387 RBIMPL_ATTR_PURE_UNLESS_DEBUG()
388 RBIMPL_ATTR_ARTIFICIAL()
389static inline bool
390RB_OBJ_TAINTED(VALUE obj)
391{
392 return RB_FL_ANY(obj, RUBY_FL_TAINT);
393}
394
395 RBIMPL_ATTR_ARTIFICIAL()
396static inline void
397RB_OBJ_TAINT_RAW(VALUE obj)
398{
399 RB_FL_SET_RAW(obj, RUBY_FL_TAINT);
400}
401
402 RBIMPL_ATTR_ARTIFICIAL()
403static inline void
404RB_OBJ_TAINT(VALUE obj)
405{
406 if (RB_OBJ_TAINTABLE(obj)) {
407 RB_OBJ_TAINT_RAW(obj);
408 }
409}
410
411 RBIMPL_ATTR_ARTIFICIAL()
412static inline void
413RB_OBJ_INFECT_RAW(VALUE dst, VALUE src)
414{
415 RBIMPL_ASSERT_OR_ASSUME(RB_OBJ_TAINTABLE(dst));
416 RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(src));
417 RB_FL_SET_RAW(dst, RB_OBJ_TAINTED_RAW(src));
418}
419
420 RBIMPL_ATTR_ARTIFICIAL()
421static inline void
422RB_OBJ_INFECT(VALUE dst, VALUE src)
423{
424 if (RB_OBJ_TAINTABLE(dst) && RB_FL_ABLE(src)) {
425 RB_OBJ_INFECT_RAW(dst, src);
426 }
427}
428
429 RBIMPL_ATTR_PURE_UNLESS_DEBUG()
430 RBIMPL_ATTR_ARTIFICIAL()
431/* It is intentional not to return bool here. There is a place in ruby core
432 * (namely class.c:singleton_class_of()) where return value of this function is
433 * verbatimly passed to RB_FL_SET_RAW. */
434static inline VALUE
435RB_OBJ_FROZEN_RAW(VALUE obj)
436{
437 return RB_FL_TEST_RAW(obj, RUBY_FL_FREEZE);
438}
439
440 RBIMPL_ATTR_PURE_UNLESS_DEBUG()
441 RBIMPL_ATTR_ARTIFICIAL()
442static inline bool
443RB_OBJ_FROZEN(VALUE obj)
444{
445 if (! RB_FL_ABLE(obj)) {
446 return true;
447 }
448 else {
449 return RB_OBJ_FROZEN_RAW(obj);
450 }
451}
452
453 RBIMPL_ATTR_ARTIFICIAL()
454static inline void
455RB_OBJ_FREEZE_RAW(VALUE obj)
456{
457 RB_FL_SET_RAW(obj, RUBY_FL_FREEZE);
458}
459
460static inline void
461rb_obj_freeze_inline(VALUE x)
462{
463 if (RB_FL_ABLE(x)) {
464 RB_OBJ_FREEZE_RAW(x);
465 if (RBASIC_CLASS(x) && !(RBASIC(x)->flags & RUBY_FL_SINGLETON)) {
466 rb_freeze_singleton_class(x);
467 }
468 }
469}
470
471#endif /* RBIMPL_FL_TYPE_H */
artificial.h
Defines RBIMPL_ATTR_ARTIFICIAL.
RBIMPL_ATTR_ARTIFICIAL
#define RBIMPL_ATTR_ARTIFICIAL()
Wraps (or simulates) __attribute__((artificial))
Definition: artificial.h:43
assert.h
RBIMPL_ASSERT_OR_ASSUME
#define RBIMPL_ASSERT_OR_ASSUME(expr)
This is either RUBY_ASSERT or RBIMPL_ASSUME, depending on RUBY_DEBUG.
Definition: assert.h:229
cast.h
Defines RBIMPL_CAST.
defines.h
RB_GNUC_EXTENSION
#define RB_GNUC_EXTENSION
Definition: defines.h:85
dllexport.h
Tewaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:86
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:77
ruby_fl_ushift
ruby_fl_ushift
Definition: fl_type.h:150
RUBY_FL_USHIFT
@ RUBY_FL_USHIFT
Definition: fl_type.h:150
RUBY_FL_DUPPED
@ RUBY_FL_DUPPED
Definition: fl_type.h:207
RUBY_ELTS_SHARED
#define RUBY_ELTS_SHARED
Definition: fl_type.h:85
ruby_fl_type
ruby_fl_type
Definition: fl_type.h:162
RUBY_FL_PROMOTED1
@ RUBY_FL_PROMOTED1
Definition: fl_type.h:165
RUBY_FL_SINGLETON
@ RUBY_FL_SINGLETON
Definition: fl_type.h:204
RUBY_FL_TAINT
@ RUBY_FL_TAINT
Definition: fl_type.h:168
RUBY_FL_WB_PROTECTED
@ RUBY_FL_WB_PROTECTED
Definition: fl_type.h:163
RUBY_FL_PROMOTED0
@ RUBY_FL_PROMOTED0
Definition: fl_type.h:164
RUBY_FL_EXIVAR
@ RUBY_FL_EXIVAR
Definition: fl_type.h:172
RUBY_FL_UNTRUSTED
@ RUBY_FL_UNTRUSTED
Definition: fl_type.h:170
RUBY_FL_PROMOTED
@ RUBY_FL_PROMOTED
Definition: fl_type.h:166
RUBY_FL_FREEZE
@ RUBY_FL_FREEZE
Definition: fl_type.h:173
RUBY_FL_SEEN_OBJ_ID
@ RUBY_FL_SEEN_OBJ_ID
Definition: fl_type.h:171
RUBY_FL_SHAREABLE
@ RUBY_FL_SHAREABLE
Definition: fl_type.h:169
RUBY_FL_FINALIZE
@ RUBY_FL_FINALIZE
Definition: fl_type.h:167
RBIMPL_FL_USER_N
#define RBIMPL_FL_USER_N(n)
Definition: fl_type.h:175
flag_enum.h
Defines RBIMPL_ATTR_FLAG_ENUM.
RBIMPL_ATTR_FLAG_ENUM
#define RBIMPL_ATTR_FLAG_ENUM()
Wraps (or simulates) __attribute__((flag_enum)
Definition: flag_enum.h:30
forceinline.h
Defines RBIMPL_ATTR_FORCEINLINE.
RBIMPL_ATTR_FORCEINLINE
#define RBIMPL_ATTR_FORCEINLINE()
Wraps (or simulates) __forceinline.
Definition: forceinline.h:37
rb_freeze_singleton_class
void rb_freeze_singleton_class(VALUE klass)
Definition: class.c:1873
rb_obj_infect
void rb_obj_infect(VALUE victim, VALUE carrier)
Does nothing.
Definition: object.c:1089
config.h
Thin wrapper to ruby/config.h.
noalias.h
Defines RBIMPL_ATTR_NOALIAS.
RBIMPL_ATTR_NOALIAS
#define RBIMPL_ATTR_NOALIAS()
Wraps (or simulates) __declspec((noalias))
Definition: noalias.h:55
pure.h
Defines RBIMPL_ATTR_PURE.
RBIMPL_ATTR_PURE_UNLESS_DEBUG
#define RBIMPL_ATTR_PURE_UNLESS_DEBUG()
Enables RBIMPL_ATTR_PURE iff.
Definition: pure.h:38
rbasic.h
Defines struct RBasic.
RBASIC
#define RBASIC(obj)
Definition: rbasic.h:34
RBASIC_CLASS
#define RBASIC_CLASS
Definition: rbasic.h:35
special_consts.h
Defines enum ruby_special_consts.
stdbool.h
C99 shim for <stdbool.h>
RBasic
Definition: rbasic.h:47
value.h
Defines VALUE and ID.
RBIMPL_VALUE_NULL
#define RBIMPL_VALUE_NULL
Definition: value.h:43
VALUE
unsigned long VALUE
Definition: value.h:38
value_type.h
Defines enum ruby_value_type.
RUBY_T_NODE
@ RUBY_T_NODE
Definition: value_type.h:137
RUBY_T_MASK
@ RUBY_T_MASK
Definition: value_type.h:142
RUBY_T_BIGNUM
@ RUBY_T_BIGNUM
Definition: value_type.h:122
RUBY_T_FLOAT
@ RUBY_T_FLOAT
Definition: value_type.h:116