From 3a746e7d7675e945077e6704898148ce199e2271 Mon Sep 17 00:00:00 2001 From: Joey Date: Sun, 25 May 2014 22:52:35 -0600 Subject: [PATCH] Fixed issue #100: Already released error This issue would cause running the example program to crash with the error: File "/usr/local/lib/python2.7/dist-packages/llvm/passes.py", line 161, in add self._ptr.add(pass_obj._ptr) File "/usr/local/lib/python2.7/dist-packages/llvmpy/api/llvm/__init__.py", line 3726, in add capsule.release_ownership(unwrapped1[0]) File "/usr/local/lib/python2.7/dist-packages/llvmpy/capsule.py", line 113, in release_ownership raise Exception("Already released") Exception: Already released --- llvmpy/capsule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvmpy/capsule.py b/llvmpy/capsule.py index 3fb9a39..9f15cd2 100644 --- a/llvmpy/capsule.py +++ b/llvmpy/capsule.py @@ -222,7 +222,7 @@ class Wrapper(object): @classmethod def _has_dtor(cls): - return hasattr(cls, '_delete_') + return hasattr(cls, '__delete__') #def downcast(obj, cls):