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

Ruby 3.3.6p108 (2024-11-05 revision 75015d4c1f6965b5e85e96fb309f1f2129f933c0)

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:74
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:65
RUBY_FL_USER3
@ RUBY_FL_USER3
User-defined flag.
Definition fl_type.h:331
rb_class_get_superclass
VALUE rb_class_get_superclass(VALUE klass)
Returns the superclass of a class.
Definition object.c:2136
RClass
Definition class.h:80
value.h
Defines VALUE and ID.
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40