Ruby: ext/psych/psych_yaml_tree.c Source File

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

psych_yaml_tree.c
Go to the documentation of this file.
1#include <psych.h>
2
3 VALUE cPsychVisitorsYamlTree;
4
5 void Init_psych_yaml_tree(void)
6{
7 VALUE psych = rb_define_module("Psych");
8 VALUE visitors = rb_define_module_under(psych, "Visitors");
9 VALUE visitor = rb_define_class_under(visitors, "Visitor", rb_cObject);
10 cPsychVisitorsYamlTree = rb_define_class_under(visitors, "YAMLTree", visitor);
11}
12/* vim: set noet sws=4 sw=4: */
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:797
rb_define_module
VALUE rb_define_module(const char *name)
Definition: class.c:871
rb_define_module_under
VALUE rb_define_module_under(VALUE outer, const char *name)
Definition: class.c:895
rb_cObject
VALUE rb_cObject
Object class.
Definition: object.c:49
psych.h
cPsychVisitorsYamlTree
VALUE cPsychVisitorsYamlTree
Definition: psych_yaml_tree.c:3
Init_psych_yaml_tree
void Init_psych_yaml_tree(void)
Definition: psych_yaml_tree.c:5
VALUE
unsigned long VALUE
Definition: value.h:38