-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecation warnings #49
Comments
Some more.... diff --git a/src/LightXML.jl b/src/LightXML.jl
index 5baf6c8..b8dbb6b 100644
--- a/src/LightXML.jl
+++ b/src/LightXML.jl
@@ -16,7 +16,11 @@ end
-const libxml2 = @windows? Pkg.dir("WinRPM","deps","usr","$(Sys.ARCH)-w64-mingw32","sys-root","mingw","b
+@static if is_windows()
+ const libxml2 = Pkg.dir("WinRPM","deps","usr","$(Sys.ARCH)-w64-mingw32","sys-root","mingw","bin","l
+else
+ const libxml2 = "libxml2"
+end
export
@@ -48,7 +52,7 @@ typealias Xptr Ptr{xmlBuffer}
# pre-condition: p is not null
# (After tests, it seems that free in libc instead of xmlFree
# should be used here.)
-_xcopystr(p::Xstr) = (r = bytestring(p); Libc.free(p); r)
+_xcopystr(p::Xstr) = (r = unsafe_string(p); Libc.free(p); r)
include("errors.jl")
diff --git a/src/document.jl b/src/document.jl
index 02bbaa8..a09741f 100644
--- a/src/document.jl
+++ b/src/document.jl
@@ -53,8 +53,8 @@ type XMLDocument
end
end
-version(xdoc::XMLDocument) = bytestring(xdoc._struct.version)
-encoding(xdoc::XMLDocument) = bytestring(xdoc._struct.encoding)
+version(xdoc::XMLDocument) = unsafe_string(xdoc._struct.version)
+encoding(xdoc::XMLDocument) = unsafe_string(xdoc._struct.encoding)
compression(xdoc::XMLDocument) = @compat Int(xdoc._struct.compression)
standalone(xdoc::XMLDocument) = @compat Int(xdoc._struct.standalone)
diff --git a/src/nodes.jl b/src/nodes.jl
index 16d9a9a..ff0466f 100644
--- a/src/nodes.jl
+++ b/src/nodes.jl
@@ -82,7 +82,7 @@ type XMLAttr
end
end
-name(a::XMLAttr) = bytestring(a._struct.name)
+name(a::XMLAttr) = unsafe_string(a._struct.name)
function value(a::XMLAttr)
pct = ccall((:xmlNodeGetContent,libxml2), Xstr, (Xptr,), a._struct.children)
@@ -138,7 +138,7 @@ type XMLNode <: AbstractXMLNode
end
end
-name(nd::XMLNode) = bytestring(nd._struct.name)
+name(nd::XMLNode) = unsafe_string(nd._struct.name)
nodetype(nd::XMLNode) = nd._struct.nodetype
has_children(nd::XMLNode) = (nd._struct.children != C_NULL)
diff --git a/src/utils.jl b/src/utils.jl
index cd22cd6..61132d1 100644
--- a/src/utils.jl
+++ b/src/utils.jl
@@ -16,4 +16,4 @@ free(buf::XBuffer) = ccall((:xmlBufferFree,libxml2), Void, (Xptr,), buf.ptr)
Base.length(buf::XBuffer) = int(ccall((:xmlBufferLength,libxml2), Cint, (Xptr,), buf.ptr))
-content(buf::XBuffer) = bytestring(ccall((:xmlBufferContent,libxml2), Xstr, (Xptr,), buf.ptr))
+content(buf::XBuffer) = unsafe_string(ccall((:xmlBufferContent,libxml2), Xstr, (Xptr,), buf.ptr)) |
FYI, please submit a PR instead of posting diffs on an issue unless you want it to be ignored. |
Surely it would save everyone some time if someone who has commit access just took the patch and did: cat | patch << EOF
-- paste patch --
EOF What is the benefit of forking the package, applying the patch to the fork, pushing to github, creating a PR, remembering to clean up the fork later etc etc... just to do a simple rename as instructed by a dep warning ? |
Not at all.
One button click
Should have already been done
At most two commands
Can't be skipped, even for people with commit access. (edit: And FWIW, shouldn't be harder than opening an issue and manually paste a really long patch, especially given that clipboard and browsers are not always particularly reliable about code formatting, (trailing) whitespace etc)
Not necessary.
It is not always simple. Especially to make sure it actually has the right behavior on all supported versions (and verify on the CI) and also to make sure the version dependencies are listed correctly. |
The text was updated successfully, but these errors were encountered: