def __init__(self, name, methods, attributes, decl, instance_map, local_map): self.name = name # resolve overloadings self.methods = OrderKeepingDictionary() for m in methods: self.methods.setdefault(m.name, []).append(m) self.attributes = attributes self.cpp_decl = decl self.ns = get_namespace(decl.pxd_path, default_namespace) self.wrap_ignore = decl.annotations.get("wrap-ignore", False) self.no_pxd_import = decl.annotations.get("no-pxd-import", False) self.wrap_manual_memory = decl.annotations.get("wrap-manual-memory", []) # fix previous code where we had a bool ... if self.wrap_manual_memory == True: self.wrap_manual_memory = ["__old-model"] else: self.wrap_manual_memory == [] assert (isinstance(self.wrap_manual_memory, list)) self.wrap_hash = decl.annotations.get("wrap-hash", []) self.local_map = local_map self.instance_map = instance_map
def __init__(self, name, methods, attributes, decl, instance_map, local_map): self.name = name # resolve overloadings self.methods = OrderKeepingDictionary() for m in methods: self.methods.setdefault(m.name, []).append(m) self.attributes = attributes self.cpp_decl = decl # self.items = getattr(decl, "items", []) self.wrap_ignore = decl.annotations.get("wrap-ignore", False) self.wrap_manual_memory = decl.annotations.get("wrap-manual-memory", False) self.wrap_hash = decl.annotations.get("wrap-hash", []) self.local_map = local_map self.instance_map = instance_map