Skip to content

Commit

Permalink
avoid using "type" for Julia 0.7 compatibility (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
bicycle1885 authored Jul 15, 2019
1 parent 27fb71c commit 02cc111
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/node.jl
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,11 @@ end

function Base.show(io::IO, node::Node)
prefix = isdefined(Main, :Node) ? "Node" : "EzXML.Node"
type = nodetype(node)
if type (ELEMENT_NODE, ATTRIBUTE_NODE) && hasnodename(node)
desc = string(repr(type), '[', nodename(node), ']')
ntype = nodetype(node)
if ntype (ELEMENT_NODE, ATTRIBUTE_NODE) && hasnodename(node)
desc = string(repr(ntype), '[', nodename(node), ']')
else
desc = repr(type)
desc = repr(ntype)
end
@printf(io, "%s(<%s@%p>)", prefix, desc, node.ptr)
end
Expand Down

0 comments on commit 02cc111

Please sign in to comment.