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

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

rclass.h
Go to the documentation of this file.
1#ifndef RBIMPL_RCLASS_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_RCLASS_H
23#include "ruby/internal/dllexport.h"
24#include "ruby/internal/value.h"
25#include "ruby/internal/cast.h"
26
27#define RMODULE_IS_OVERLAID RMODULE_IS_OVERLAID
28#define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT
29#define RMODULE_INCLUDED_INTO_REFINEMENT RMODULE_INCLUDED_INTO_REFINEMENT
30
31#define RCLASS(obj) RBIMPL_CAST((struct RClass *)(obj))
32#define RMODULE RCLASS
33#define RCLASS_SUPER rb_class_get_superclass
34
35 enum ruby_rmodule_flags {
36 RMODULE_IS_OVERLAID = RUBY_FL_USER2,
37 RMODULE_IS_REFINEMENT = RUBY_FL_USER3,
38 RMODULE_INCLUDED_INTO_REFINEMENT = RUBY_FL_USER4
39};
40
41struct RClass; /* Opaque, declared here for RCLASS() macro. */
42
43 RBIMPL_SYMBOL_EXPORT_BEGIN()
44 VALUE rb_class_get_superclass(VALUE);
45 RBIMPL_SYMBOL_EXPORT_END()
46
47#endif /* RBIMPL_RCLASS_H */
cast.h
Defines RBIMPL_CAST.
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
rb_class_get_superclass
VALUE rb_class_get_superclass(VALUE)
Returns the superclass of klass The return value might be an iclass of a module, unlike rb_class_supe...
Definition: object.c:1999
RMODULE_INCLUDED_INTO_REFINEMENT
#define RMODULE_INCLUDED_INTO_REFINEMENT
Definition: rclass.h:29
RMODULE_IS_REFINEMENT
#define RMODULE_IS_REFINEMENT
Definition: rclass.h:28
RMODULE_IS_OVERLAID
#define RMODULE_IS_OVERLAID
Definition: rclass.h:27
ruby_rmodule_flags
ruby_rmodule_flags
Definition: rclass.h:35
RClass
Definition: class.h:60
value.h
Defines VALUE and ID.
VALUE
unsigned long VALUE
Definition: value.h:38