コード例 #1
0
ファイル: types.py プロジェクト: meme/binaryninja-api
	def __getitem__(self, name):
		try:
			member = core.BNGetStructureMemberByName(self.handle, name)
			return StructureMember(Type(core.BNNewTypeReference(member.contents.type), confidence=member.contents.typeConfidence),
					member.contents.name, member.contents.offset)
		finally:
			core.BNFreeStructureMember(member)
コード例 #2
0
ファイル: types.py プロジェクト: cblichmann/binaryninja-api
	def member_at_offset(self, offset):
		try:
			if self._mutable:
				member = core.BNGetStructureBuilderMemberAtOffset(self._handle, offset, None)
			else:
				member = core.BNGetStructureMemberAtOffset(self._handle, offset, None)
			return StructureMember(Type(core.BNNewTypeReference(member.contents.type), confidence=member.contents.typeConfidence),
					member.contents.name, member.contents.offset)
		finally:
			core.BNFreeStructureMember(member)