summaryrefslogtreecommitdiff
path: root/python/typelibrary.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/typelibrary.py
parentd28dc76f738c1b3c6469213c2582ca7680b8fefe (diff)
Commonize _to_core_struct/_from_core_struct
Improve implementation of immutable_copy/mutable_copy
Diffstat (limited to 'python/typelibrary.py')
-rw-r--r--python/typelibrary.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/typelibrary.py b/python/typelibrary.py
index c4d495c3..8a4e32ea 100644
--- a/python/typelibrary.py
+++ b/python/typelibrary.py
@@ -283,7 +283,7 @@ class TypeLibrary:
type = type.immutable_copy()
if not isinstance(type, types.Type):
raise ValueError("type must be a Type")
- core.BNAddTypeLibraryNamedObject(self.handle, name._get_core_struct(), type.handle)
+ core.BNAddTypeLibraryNamedObject(self.handle, name._to_core_struct(), type.handle)
def add_named_type(self, name:'types.QualifiedName', type:'types.Type') -> None:
"""
@@ -304,7 +304,7 @@ class TypeLibrary:
type = type.immutable_copy()
if not isinstance(type, types.Type):
raise ValueError("parameter type must be a Type")
- core.BNAddTypeLibraryNamedType(self.handle, name._get_core_struct(), type.handle)
+ core.BNAddTypeLibraryNamedType(self.handle, name._to_core_struct(), type.handle)
def get_named_object(self, name):
"""
@@ -317,7 +317,7 @@ class TypeLibrary:
"""
if not isinstance(name, types.QualifiedName):
name = types.QualifiedName(name)
- t = core.BNGetTypeLibraryNamedObject(self.handle, name._get_core_struct())
+ t = core.BNGetTypeLibraryNamedObject(self.handle, name._to_core_struct())
if t is None:
return None
return types.Type.create(t)
@@ -333,7 +333,7 @@ class TypeLibrary:
"""
if not isinstance(name, types.QualifiedName):
name = types.QualifiedName(name)
- t = core.BNGetTypeLibraryNamedType(self.handle, name._get_core_struct())
+ t = core.BNGetTypeLibraryNamedType(self.handle, name._to_core_struct())
if t is None:
return None
return types.Type.create(t)