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

Ruby 3.4.7p58 (2025-10-08 revision 7a5688e2a27668e48f8d6ff4af5b2208b98a2f5e)

module.h
Go to the documentation of this file.
1#ifndef RBIMPL_MODULE_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_MODULE_H
23#include "ruby/internal/dllexport.h"
24#include "ruby/internal/value.h"
25
40
41 RBIMPL_SYMBOL_EXPORT_BEGIN()
42
43 RBIMPL_ATTR_NONNULL(())
67 VALUE rb_define_class(const char *name, VALUE super);
68
69 RBIMPL_ATTR_NONNULL(())
86 VALUE rb_define_module(const char *name);
87
88 RBIMPL_ATTR_NONNULL(())
109 VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super);
110
111 RBIMPL_ATTR_NONNULL(())
124 VALUE rb_define_module_under(VALUE outer, const char *name);
125
138void rb_include_module(VALUE klass, VALUE module);
139
150void rb_extend_object(VALUE obj, VALUE mod);
151
171void rb_prepend_module(VALUE klass, VALUE module);
172
174
175 RBIMPL_SYMBOL_EXPORT_END()
176
177#endif /* RBIMPL_MODULE_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
rb_include_module
void rb_include_module(VALUE klass, VALUE module)
Includes a module to a class.
Definition class.c:1187
rb_define_class
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
Definition class.c:980
rb_extend_object
void rb_extend_object(VALUE obj, VALUE module)
Extend the object with the module.
Definition eval.c:1756
rb_prepend_module
void rb_prepend_module(VALUE klass, VALUE module)
Identical to rb_include_module(), except it "prepends" the passed module to the klass,...
Definition class.c:1443
rb_define_class_under
VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
Defines a class under the namespace of outer.
Definition class.c:1012
rb_define_module
VALUE rb_define_module(const char *name)
Defines a top-level module.
Definition class.c:1095
rb_define_module_under
VALUE rb_define_module_under(VALUE outer, const char *name)
Defines a module under the namespace of outer.
Definition class.c:1119
RBIMPL_ATTR_NONNULL
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
value.h
Defines VALUE and ID.
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40