Fix the LLVM Object Cache key to include the class name as well..
This commit is contained in:
parent
7b6aac79fb
commit
52b2bcd2c1
1 changed files with 3 additions and 2 deletions
|
|
@ -118,10 +118,11 @@ class _ObjectCache(type):
|
|||
|
||||
def __call__(cls, ptr, *args, **kwargs):
|
||||
objid = _core.PyCObjectVoidPtrToPyLong(ptr)
|
||||
obj = _ObjectCache.__instances.get(objid)
|
||||
key = "%s:%d" % (cls.__name__, objid)
|
||||
obj = _ObjectCache.__instances.get(key)
|
||||
if obj is None:
|
||||
obj = super(_ObjectCache, cls).__call__(ptr, *args, **kwargs)
|
||||
_ObjectCache.__instances[objid] = obj
|
||||
_ObjectCache.__instances[key] = obj
|
||||
return obj
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue