Ruby  3.4.0dev (2024-12-06 revision 892c46283a5ea4179500d951c9d4866c0051f27b)
module.h
Go to the documentation of this file.
1 #ifndef RBIMPL_MODULE_H /*-*-C++-*-vi:se ft=cpp:*/
2 #define RBIMPL_MODULE_H
24 #include "ruby/internal/value.h"
25 
42 
67 VALUE rb_define_class(const char *name, VALUE super);
68 
86 VALUE rb_define_module(const char *name);
87 
109 VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super);
110 
124 VALUE rb_define_module_under(VALUE outer, const char *name);
125 
138 void rb_include_module(VALUE klass, VALUE module);
139 
150 void rb_extend_object(VALUE obj, VALUE mod);
151 
171 void rb_prepend_module(VALUE klass, VALUE module);
172 
176 
177 #endif /* RBIMPL_MODULE_H */
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:74
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:65
void rb_include_module(VALUE klass, VALUE module)
Includes a module to a class.
Definition: class.c:1187
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
Definition: class.c:980
void rb_extend_object(VALUE obj, VALUE mod)
Extend the object with the module.
Definition: eval.c:1735
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:1438
VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
Defines a class under the namespace of outer.
Definition: class.c:1012
VALUE rb_define_module(const char *name)
Defines a top-level module.
Definition: class.c:1095
VALUE rb_define_module_under(VALUE outer, const char *name)
Defines a module under the namespace of outer.
Definition: class.c:1119
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition: nonnull.h:27
Defines VALUE and ID.
uintptr_t VALUE
Type that represents a Ruby object.
Definition: value.h:40