Ruby: include/ruby/internal/core/rclass.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

rclass.h
Go to the documentation of this file.
1#ifndef RBIMPL_RCLASS_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_RCLASS_H
24#include "ruby/internal/dllexport.h"
25#include "ruby/internal/value.h"
26#include "ruby/internal/cast.h"
27
29#define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT
38#define RCLASS(obj) RBIMPL_CAST((struct RClass *)(obj))
39
41#define RMODULE RCLASS
42
44#define RCLASS_SUPER rb_class_get_superclass
45
55enum ruby_rmodule_flags {
61 RMODULE_IS_REFINEMENT = RUBY_FL_USER3
62};
63
64struct RClass; /* Opaque, declared here for RCLASS() macro. */
65
66 RBIMPL_SYMBOL_EXPORT_BEGIN()
90 VALUE rb_class_get_superclass(VALUE klass);
91 RBIMPL_SYMBOL_EXPORT_END()
92
93#endif /* RBIMPL_RCLASS_H */
dllexport.h
Tweaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition dllexport.h:106
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:97
RUBY_FL_USER3
@ RUBY_FL_USER3
User-defined flag.
Definition fl_type.h:363
rb_class_get_superclass
VALUE rb_class_get_superclass(VALUE klass)
Returns the superclass of a class.
Definition object.c:2018
RClass
Definition class.h:66
value.h
Defines VALUE and ID.
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40