Skip to content

Commit 4d61180

Browse files
committed
Fixes for Julia 0.4
1 parent d269906 commit 4d61180

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
julia 0.3-
22
BinDeps
3+
Compat
34
@windows WinRPM

src/LightXML.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module LightXML
2020
XMLDocument, version, encoding, compression, standalone, root,
2121
parse_file, parse_string, save_file, set_root, create_root
2222

23-
23+
using Compat
2424
include("clib.jl")
2525
include("errors.jl")
2626

src/clib.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# C functions in the library
22

3-
@unix_only const libxml2 = dlopen("libxml2", RTLD_GLOBAL)
4-
@windows_only const libxml2 = dlopen(Pkg.dir("WinRPM","deps","usr","$(Sys.ARCH)-w64-mingw32","sys-root","mingw","bin","libxml2-2"))
3+
@unix_only const libxml2 = Libdl.dlopen("libxml2", Libdl.RTLD_GLOBAL)
4+
@windows_only const libxml2 = Libdl.dlopen(Pkg.dir("WinRPM","deps","usr","$(Sys.ARCH)-w64-mingw32","sys-root","mingw","bin","libxml2-2"))
55

66
macro lx2func(fname) # the macro to get functions from libxml2
77
quote
8-
$(esc(fname)) = dlsym( libxml2, ($(string(fname))) )
8+
$(esc(fname)) = Libdl.dlsym( libxml2, ($(string(fname))) )
99
end
1010
end
1111

src/document.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ end
5555

5656
version(xdoc::XMLDocument) = bytestring(xdoc._struct.version)
5757
encoding(xdoc::XMLDocument) = bytestring(xdoc._struct.encoding)
58-
compression(xdoc::XMLDocument) = int(xdoc._struct.compression)
59-
standalone(xdoc::XMLDocument) = int(xdoc._struct.standalone)
58+
compression(xdoc::XMLDocument) = @compat Int(xdoc._struct.compression)
59+
standalone(xdoc::XMLDocument) = @compat Int(xdoc._struct.standalone)
6060

6161
function root(xdoc::XMLDocument)
6262
pr = ccall(xmlDocGetRootElement, Ptr{Void}, (Ptr{Void},), xdoc.ptr)

src/nodes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ nodetype(nd::XMLNode) = nd._struct.nodetype
143143
has_children(nd::XMLNode) = (nd._struct.children != nullptr)
144144

145145
# whether it is a white-space only text node
146-
is_blanknode(nd::XMLNode) = bool(ccall(xmlIsBlankNode, Cint, (Xptr,), nd.ptr))
146+
is_blanknode(nd::XMLNode) = @compat Bool(ccall(xmlIsBlankNode, Cint, (Xptr,), nd.ptr))
147147

148148
function free(nd::XMLNode)
149149
ccall(xmlFreeNode, Void, (Xptr,), nd.ptr)

0 commit comments

Comments
 (0)