Skip to content

Commit bda8efd

Browse files
committed
Do not define byte_size and byte_align if decl_type is None
this will allow to mock the object for testing, without passing a decl_type as argument.
1 parent 02600c2 commit bda8efd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygccxml/declarations/typedef.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self, name='', decl_type=None):
2020
declaration.declaration_t.__init__(self, name)
2121
byte_info.byte_info.__init__(self)
2222
self._decl_type = decl_type
23-
if not isinstance(decl_type, str):
23+
if not isinstance(decl_type, str) and decl_type is not None:
2424
self.byte_size = decl_type.byte_size
2525
self.byte_align = decl_type.byte_align
2626

0 commit comments

Comments
 (0)