mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
[llvm.py] Make LLVMObject.__del__ work if called during __init__
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152505 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
644f191d31
commit
d3ac784fbb
@ -58,6 +58,9 @@ class LLVMObject(object):
|
||||
return self._as_parameter_
|
||||
|
||||
def __del__(self):
|
||||
if not hasattr(self, '_self_owned') or not hasattr(self, '_disposer'):
|
||||
return
|
||||
|
||||
if self._self_owned and self._disposer:
|
||||
self._disposer(self)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user