Skip to content

Commit

Permalink
tolerate dlclose(C_NULL). fixes JuliaLang#3211
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Jun 1, 2013
1 parent 2251a60 commit fb04bca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/c.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dlopen(s::String, flags::Integer) = ccall(:jl_load_dynamic_library, Ptr{Void}, (
dlopen_e(s::String, flags::Integer) = ccall(:jl_load_dynamic_library_e, Ptr{Void}, (Ptr{Uint8},Uint32), s, flags)
dlopen(s::String) = dlopen(s, RTLD_LAZY | RTLD_DEEPBIND)
dlopen_e(s::String) = dlopen_e(s, RTLD_LAZY | RTLD_DEEPBIND)
dlclose(p::Ptr) = ccall(:uv_dlclose,Void,(Ptr{Void},),p)
dlclose(p::Ptr) = if p!=C_NULL; ccall(:uv_dlclose,Void,(Ptr{Void},),p); end

cfunction(f::Function, r, a) =
ccall(:jl_function_ptr, Ptr{Void}, (Any, Any, Any), f, r, a)
Expand Down

0 comments on commit fb04bca

Please sign in to comment.