Fix problem with caching llvm.core.Value objects.

This commit is contained in:
Siu Kwan Lam 2013-02-15 11:18:51 -06:00
commit bf121485ad
2 changed files with 18 additions and 8 deletions

View file

@ -14,7 +14,14 @@ class Wrapper(object):
@property
def _ptr(self):
return self.__ptr
try:
return self.__ptr
except AttributeError:
raise AttributeError("_ptr resource has been removed")
@_ptr.deleter
def _ptr(self):
del self.__ptr
def _extract_ptrs(objs):