Skip to content

Commit cfdcbeb

Browse files
authored
Merge pull request #207 from y-yagi/fix-warnings-about-T_DATA-classes
Fix Ruby warnings about t data classes
2 parents c7b46b0 + 07d172e commit cfdcbeb

6 files changed

Lines changed: 6 additions & 0 deletions

ext/libxml/ruby_xml_attr_decl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ VALUE rxml_attr_decl_value_get(VALUE self)
143143
void rxml_init_attr_decl(void)
144144
{
145145
cXMLAttrDecl = rb_define_class_under(mXML, "AttrDecl", rb_cObject);
146+
rb_undef_alloc_func(cXMLAttrDecl);
146147
rb_define_method(cXMLAttrDecl, "doc", rxml_attr_decl_doc_get, 0);
147148
rb_define_method(cXMLAttrDecl, "name", rxml_attr_decl_name_get, 0);
148149
rb_define_method(cXMLAttrDecl, "next", rxml_attr_decl_next_get, 0);

ext/libxml/ruby_xml_attributes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ static VALUE rxml_attributes_first(VALUE self)
263263
void rxml_init_attributes(void)
264264
{
265265
cXMLAttributes = rb_define_class_under(mXML, "Attributes", rb_cObject);
266+
rb_undef_alloc_func(cXMLAttributes);
266267
rb_include_module(cXMLAttributes, rb_mEnumerable);
267268
rb_define_method(cXMLAttributes, "node", rxml_attributes_node_get, 0);
268269
rb_define_method(cXMLAttributes, "get_attribute", rxml_attributes_get_attribute, 1);

ext/libxml/ruby_xml_schema_attribute.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ static VALUE rxml_schema_attribute_node(VALUE self)
9797
void rxml_init_schema_attribute(void)
9898
{
9999
cXMLSchemaAttribute = rb_define_class_under(cXMLSchema, "Attribute", rb_cObject);
100+
rb_undef_alloc_func(cXMLSchemaAttribute);
100101
rb_define_attr(cXMLSchemaAttribute, "name", 1, 0);
101102
rb_define_attr(cXMLSchemaAttribute, "type", 1, 0);
102103
rb_define_attr(cXMLSchemaAttribute, "namespace", 1, 0);

ext/libxml/ruby_xml_schema_element.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ static VALUE rxml_schema_element_annot(VALUE self)
5959
void rxml_init_schema_element(void)
6060
{
6161
cXMLSchemaElement = rb_define_class_under(cXMLSchema, "Element", rb_cObject);
62+
rb_undef_alloc_func(cXMLSchemaElement);
6263
rb_define_attr(cXMLSchemaElement, "name", 1, 0);
6364
rb_define_attr(cXMLSchemaElement, "value", 1, 0);
6465
rb_define_attr(cXMLSchemaElement, "namespace", 1, 0);

ext/libxml/ruby_xml_schema_type.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ void rxml_init_schema_type(void)
237237
#endif
238238

239239
cXMLSchemaType = rb_define_class_under(cXMLSchema, "Type", rb_cObject);
240+
rb_undef_alloc_func(cXMLSchemaType);
240241

241242
rb_define_attr(cXMLSchemaType, "namespace", 1, 0);
242243
rb_define_attr(cXMLSchemaType, "name", 1, 0);

ext/libxml/ruby_xml_xpath_object.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ static VALUE rxml_xpath_object_debug(VALUE self)
322322
void rxml_init_xpath_object(void)
323323
{
324324
cXMLXPathObject = rb_define_class_under(mXPath, "Object", rb_cObject);
325+
rb_undef_alloc_func(cXMLXPathObject);
325326
rb_include_module(cXMLXPathObject, rb_mEnumerable);
326327
rb_define_attr(cXMLXPathObject, "context", 1, 0);
327328
rb_define_method(cXMLXPathObject, "each", rxml_xpath_object_each, 0);

0 commit comments

Comments
 (0)