Skip to content

Commit ec7824b

Browse files
use ccall directly instead of @ccall
1 parent 41e8b54 commit ec7824b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/wrapper.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
function OpenDialog(filterlist::Cstring, defaultpath::Cstring)
22
outpath = Ref(Ptr{UInt8}())
3-
status = @ccall libnfd.NFD_OpenDialog(filterlist::Cstring, defaultpath::Cstring, outpath::Ref{Ptr{UInt8}})::NFDResult
3+
status = ccall((:NFD_OpenDialog, libnfd), NFDResult, (Cstring, Cstring, Ref{Ptr{UInt8}}), filterlist, defaultpath, outpath)
44
return status, outpath[]
55
end
66

77
function OpenDialogMultiple(filterlist::Cstring, defaultpath::Cstring)
88
outpathset = Ref(NFDPathSet(C_NULL, C_NULL, 0))
9-
status = @ccall libnfd.NFD_OpenDialogMultiple(filterlist::Cstring, defaultpath::Cstring, outpathset::Ref{NFDPathSet})::NFDResult
9+
status = ccall((:NFD_OpenDialogMultiple, libnfd), NFDResult, (Cstring, Cstring, Ref{NFDPathSet}), filterlist, defaultpath, outpathset)
1010
return status, outpathset[]
1111
end
1212

1313
function SaveDialog(filterlist::Cstring, defaultpath::Cstring)
1414
outpath = Ref(Ptr{UInt8}())
15-
status = @ccall libnfd.NFD_SaveDialog(filterlist::Cstring, defaultpath::Cstring, outpath::Ref{Ptr{UInt8}})::NFDResult
15+
status = ccall((:NFD_SaveDialog, libnfd), NFDResult, (Cstring, Cstring, Ref{Ptr{UInt8}}), filterlist, defaultpath, outpath)
1616
return status, outpath[]
1717
end
1818

1919
function PickFolder(defaultpath::Cstring)
2020
outpath = Ref(Ptr{UInt8}())
21-
status = @ccall libnfd.NFD_PickFolder(defaultpath::Cstring, outpath::Ref{Ptr{UInt8}})::NFDResult
21+
status = ccall((:NFD_PickFolder, libnfd), NFDResult, (Cstring, Ref{Ptr{UInt8}}), defaultpath, outpath)
2222
return status, outpath[]
2323
end
2424

2525
function GetError()
26-
@ccall libnfd.NFD_GetError()::Cstring
26+
ccall((:NFD_GetError, libnfd), Cstring, ())
2727
end
2828

2929
function PathSetFree(pathset::NFDPathSet)
3030
refpathset = Ref(pathset)
31-
@ccall libnfd.NFD_PathSet_Free(refpathset::Ref{NFDPathSet})::Cvoid
31+
ccall((:NFD_PathSet_Free, libnfd), Cvoid, (Ref{NFDPathSet},), refpathset)
3232
end
3333

3434
function Free(ptr)
35-
@ccall libnfd.NFD_Free(ptr::Ptr{Cvoid})::Cvoid
35+
ccall((:NFD_Free, libnfd), Cvoid, (Ptr{Cvoid},), ptr)
3636
end

0 commit comments

Comments
 (0)