MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / MergeConflict

Class MergeConflict

python/collaboration/merge.py:19–216  ·  view source on GitHub ↗

Structure representing an individual merge conflict

Source from the content-addressed store, hash-verified

17
18
19class MergeConflict:
20 """
21 Structure representing an individual merge conflict
22 """
23 def __init__(self, handle: core.BNAnalysisMergeConflictHandle):
24 """
25 FFI constructor
26
27 :param handle: FFI handle for internal use
28 """
29 self._handle = ctypes.cast(handle, core.BNAnalysisMergeConflictHandle)
30
31 def __del__(self):
32 core.BNFreeAnalysisMergeConflict(self._handle)
33
34 @property
35 def database(self) -> Database:
36 """
37 Database backing all snapshots in the merge conflict
38
39 :return: Database object
40 """
41 result = core.BNAnalysisMergeConflictGetDatabase(self._handle)
42 return Database(handle=ctypes.cast(result, ctypes.POINTER(core.BNDatabase)))
43
44 @property
45 def base_snapshot(self) -> Optional[Snapshot]:
46 """
47 Snapshot which is the parent of the two being merged
48
49 :return: Snapshot object
50 """
51 result = core.BNAnalysisMergeConflictGetBaseSnapshot(self._handle)
52 if result is None:
53 return None
54 return Snapshot(handle=ctypes.cast(result, ctypes.POINTER(core.BNSnapshot)))
55
56 @property
57 def first_snapshot(self) -> Optional[Snapshot]:
58 """
59 First snapshot being merged
60
61 :return: Snapshot object
62 """
63 result = core.BNAnalysisMergeConflictGetFirstSnapshot(self._handle)
64 if result is None:
65 return None
66 return Snapshot(handle=ctypes.cast(result, ctypes.POINTER(core.BNSnapshot)))
67
68 @property
69 def second_snapshot(self) -> Optional[Snapshot]:
70 """
71 Second snapshot being merged
72
73 :return: Snapshot object
74 """
75 result = core.BNAnalysisMergeConflictGetSecondSnapshot(self._handle)
76 if result is None:

Callers 3

_handleMethod · 0.70
_can_splitMethod · 0.70
_splitMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected