Cache legacy callback interface objects in proto_or_icache_array

We need them to be cached to not instantiate them multiple times with
lazy initialisation.
This commit is contained in:
Anthony Ramine 2016-01-23 23:32:51 +01:00
parent 2c4d5da866
commit ca979e115b
3 changed files with 31 additions and 18 deletions

View file

@ -345,6 +345,10 @@ class Descriptor(DescriptorProvider):
return (self.interface.getUserData("hasConcreteDescendant", False) or
self.interface.getUserData("hasProxyDescendant", False))
def shouldHaveGetConstructorObjectMethod(self):
assert self.interface.hasInterfaceObject()
return self.interface.isCallback() or self.hasDescendants()
def isGlobal(self):
"""
Returns true if this is the primary interface for a global object