summaryrefslogtreecommitdiff
path: root/python/lineardisassembly.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2021-09-03 11:12:56 -0400
committerPeter LaFosse <peter@vector35.com>2021-09-06 11:46:43 -0400
commit5c82c6036e04936e253d2031f73f8218bbed06aa (patch)
tree7ef969a79c88e4277d495fbae1cef5131d43f6ec /python/lineardisassembly.py
parentd28dc76f738c1b3c6469213c2582ca7680b8fefe (diff)
Commonize _to_core_struct/_from_core_struct
Improve implementation of immutable_copy/mutable_copy
Diffstat (limited to 'python/lineardisassembly.py')
-rw-r--r--python/lineardisassembly.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/lineardisassembly.py b/python/lineardisassembly.py
index bc09636b..5f69c9c4 100644
--- a/python/lineardisassembly.py
+++ b/python/lineardisassembly.py
@@ -73,7 +73,7 @@ class LinearViewObjectIdentifier:
def __hash__(self):
return hash((self._name, self._start, self._end))
- def _to_api_object(self, obj = None):
+ def _to_core_struct(self, obj = None):
if obj is None:
result = core.BNLinearViewObjectIdentifier()
else:
@@ -224,7 +224,7 @@ class LinearViewObject:
return LinearViewObject(result, self)
def child_for_identifier(self, ident):
- ident_obj = ident._to_api_object()
+ ident_obj = ident._to_core_struct()
result = core.BNGetLinearViewObjectChildForIdentifier(self.handle, ident_obj)
if not result:
return None
@@ -466,7 +466,7 @@ class LinearViewCursor:
return core.BNSeekLinearViewCursorToCursorPathAndAddress(self.handle, path.handle, addr)
path_objs = (core.BNLinearViewObjectIdentifier * len(path))()
for i in range(0, len(path)):
- path[i]._to_api_object(path_objs[i])
+ path[i]._to_core_struct(path_objs[i])
if addr is None:
return core.BNSeekLinearViewCursorToPath(self.handle, path_objs, len(path))
return core.BNSeekLinearViewCursorToPathAndAddress(self.handle, path_objs, len(path), addr)