Leave pointer out of the default types (since it needs an appropriate size).

This commit is contained in:
Mike Auty
2018-06-05 21:46:02 +01:00
parent 113c23a66d
commit 36dee38a9e
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -195,6 +195,7 @@ class ISFormatTable(interfaces.symbols.SymbolTableInterface, metaclass = ABCMeta
table_mapping: typing.Optional[typing.Dict[str, str]] = None) -> None:
self._json_object = json_object
self._validate_json()
self.name = self._check_type(name, str)
nt = native_types or self._get_natives()
if nt is None:
raise ValueError("Native table not provided")
+1 -1
View File
@@ -19,7 +19,7 @@ class NativeTable(interfaces.symbols.NativeTableInterface):
self._overrides[native_type] = native_class
# Create this once early, because it may get used a lot
self._types = set(self._native_dictionary).union(
{'enum', 'array', 'bitfield', 'void', 'pointer', 'string', 'bytes', 'function'})
{'enum', 'array', 'bitfield', 'void', 'string', 'bytes', 'function'})
def get_type_class(self, name: str) -> typing.Type[interfaces.objects.ObjectInterface]:
ntype, _ = self._native_dictionary.get(name, (objects.Integer, None))