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

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

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
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
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:106
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:97
rb_include_module
void rb_include_module(VALUE klass, VALUE module)
Includes a module to a class.
Definition class.c:1130
rb_define_class
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
Definition class.c:923
rb_extend_object
void rb_extend_object(VALUE obj, VALUE mod)
Extend the object with the module.
Definition eval.c:1693
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:1385
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:955
rb_define_module
VALUE rb_define_module(const char *name)
Defines a top-level module.
Definition class.c:1038
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:1062
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