Module.link_in should not delete other.ptr and should prevent the other.ptr from being destroyed
This commit is contained in:
parent
a0a777e1aa
commit
31fbc3ae64
1 changed files with 3 additions and 1 deletions
|
|
@ -471,7 +471,9 @@ class Module(llvm.Ownable, llvm.Cacheable):
|
||||||
raise llvm.LLVMException(result)
|
raise llvm.LLVMException(result)
|
||||||
if not preserve:
|
if not preserve:
|
||||||
# Prevent user from using the other module
|
# Prevent user from using the other module
|
||||||
del other.ptr
|
other.ptr = None
|
||||||
|
# Use a dummy owner to prevent other.ptr to be deleted
|
||||||
|
other._own(llvm.DummyOwner())
|
||||||
|
|
||||||
def get_type_named(self, name):
|
def get_type_named(self, name):
|
||||||
"""Return a Type object with the given name."""
|
"""Return a Type object with the given name."""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue