Skip to content

Commit 30dc3d3

Browse files
committed
Revert "Fix incorrect types in TypedData_Get_Struct for node_type accessors."
This reverts commit 86da5a3.
1 parent 86da5a3 commit 30dc3d3

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

ext/libxml/ruby_xml_attr_decl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ static VALUE rxml_attr_decl_next_get(VALUE self)
8888
*/
8989
static VALUE rxml_attr_decl_node_type(VALUE self)
9090
{
91-
xmlAttributePtr xattr;
92-
TypedData_Get_Struct(self, xmlAttribute, &rxml_attr_decl_type, xattr);
91+
xmlAttrPtr xattr;
92+
TypedData_Get_Struct(self, xmlAttr, &rxml_attr_decl_type, xattr);
9393
return INT2NUM(xattr->type);
9494
}
9595

ext/libxml/ruby_xml_document.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -632,9 +632,9 @@ static VALUE rxml_document_next_q(VALUE self)
632632
*/
633633
static VALUE rxml_document_node_type(VALUE self)
634634
{
635-
xmlDocPtr xdoc;
636-
TypedData_Get_Struct(self, xmlDoc, &rxml_document_data_type, xdoc);
637-
return (INT2NUM(xdoc->type));
635+
xmlNodePtr xnode;
636+
TypedData_Get_Struct(self, xmlNode, &rxml_document_data_type, xnode);
637+
return (INT2NUM(xnode->type));
638638
}
639639

640640
/*

0 commit comments

Comments
 (0)