Skip to content

Commit b95c40a

Browse files
committed
calldef attributes: align to bool type
This was sometimes a bool (for the False case) and sometimes a "1" string. This makes sure these variables always have the same type
1 parent aa99c30 commit b95c40a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/pygccxml/parser/scanner.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,8 @@ def __read_calldef(self, calldef, attrs, is_declaration):
576576
if is_declaration:
577577
self.__calldefs.append(calldef)
578578
calldef.name = attrs.get(XML_AN_NAME, '')
579-
calldef.has_extern = attrs.get(XML_AN_EXTERN, False)
580-
calldef.has_inline = bool(attrs.get(XML_AN_INLINE, "") == "1")
579+
calldef.has_extern = bool(attrs.get(XML_AN_EXTERN, False))
580+
calldef.has_inline = bool(attrs.get(XML_AN_INLINE, False))
581581
throw_stmt = attrs.get(XML_AN_THROW)
582582
if None is throw_stmt:
583583
calldef.does_throw = True
@@ -593,9 +593,9 @@ def __read_calldef(self, calldef, attrs, is_declaration):
593593

594594
def __read_member_function(self, calldef, attrs, is_declaration):
595595
self.__read_calldef(calldef, attrs, is_declaration)
596-
calldef.has_const = attrs.get(XML_AN_CONST, False)
596+
calldef.has_const = bool(attrs.get(XML_AN_CONST, False))
597597
if is_declaration:
598-
calldef.has_static = attrs.get(XML_AN_STATIC, False)
598+
calldef.has_static = bool(attrs.get(XML_AN_STATIC, False))
599599
if XML_AN_PURE_VIRTUAL in attrs:
600600
calldef.virtuality = declarations.VIRTUALITY_TYPES.PURE_VIRTUAL
601601
elif XML_AN_VIRTUAL in attrs:

0 commit comments

Comments
 (0)