Skip to content

Commit

Permalink
FFI port of 8c2a112 for sparklemotion#396
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Jan 25, 2011
1 parent 3985cdf commit 1a20d89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/nokogiri/ffi/structs/xml_attr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class XmlAttr < FFI::Struct # :nodoc:
:parent, :pointer,
:next, :pointer,
:prev, :pointer,
:doc, :pointer
:doc, :pointer,
:ns, :pointer
)

end
Expand Down
8 changes: 8 additions & 0 deletions lib/nokogiri/ffi/xml/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ def recursively_remove_namespaces_from_node(node)
LibXML.xmlFreeNsList(node.cstruct[:nsDef])
node.cstruct[:nsDef] = nil
end
unless node.cstruct[:properties].nil?
prop_ptr = node.cstruct[:properties]
while ! prop_ptr.null?
prop_cstruct = LibXML::XmlAttr.new(node.cstruct[:properties])
prop_cstruct[:ns] = nil unless prop_cstruct[:ns].nil?
prop_ptr = prop_cstruct[:next]
end
end
end
end

Expand Down

0 comments on commit 1a20d89

Please sign in to comment.