Skip to content

Commit 54927f8

Browse files
committed
Set default size of array_t when no size is defined
This will allow to easier mock type_t classes in the tests
1 parent f2402af commit 54927f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pygccxml/declarations/cpptypes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,10 @@ class array_t(compound_t):
608608
"""represents C++ array type"""
609609
SIZE_UNKNOWN = -1
610610

611-
def __init__(self, base, size):
611+
def __init__(self, base, size=None):
612612
compound_t.__init__(self, base)
613+
if size is not None:
614+
size = self.SIZE_UNKNOWN
613615
self._size = size
614616

615617
@property

0 commit comments

Comments
 (0)