summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/typelibrary.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/python/typelibrary.py b/python/typelibrary.py
index e392557f..2d64b724 100644
--- a/python/typelibrary.py
+++ b/python/typelibrary.py
@@ -280,8 +280,7 @@ class TypeLibrary:
"""
if not isinstance(name, types.QualifiedName):
name = types.QualifiedName(name)
- if isinstance(type, types.MutableType):
- type = type.immutable_copy()
+ 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)
@@ -302,8 +301,7 @@ class TypeLibrary:
"""
if not isinstance(name, types.QualifiedName):
name = types.QualifiedName(name)
- if isinstance(type, types.MutableType):
- type = type.immutable_copy()
+ 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)