Skip to content
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

[Do not merge] Add a warning against having multiple copies of a shared library loaded #942

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/PyCall.jl
Expand Up @@ -31,6 +31,7 @@ end
import Conda
import MacroTools # because of issue #270
import Base.Iterators: filter
import Libdl

#########################################################################

Expand Down Expand Up @@ -472,7 +473,11 @@ end
function _pyimport(name::AbstractString)
cookie = ActivatePyActCtx()
try
return PyObject(ccall((@pysym :PyImport_ImportModule), PyPtr, (Cstring,), name))
pyobject = PyObject(ccall((@pysym :PyImport_ImportModule), PyPtr, (Cstring,), name))
# From version 1.8 it is possible to detect when two versions
# of the same shared library is loaded\
VERSION > v"1.7.999" && Libdl.dlopen("")
return pyobject
finally
DeactivatePyActCtx(cookie)
end
Expand Down