@@ -434,7 +434,7 @@ def __read_namespace(self, attrs):
434
434
# almost all files has '.' in name
435
435
ns_name = ''
436
436
decl = self .__decl_factory .create_namespace (name = ns_name )
437
- if attrs .get (XML_AN_COMMENT ):
437
+ if attrs .get (XML_AN_COMMENT ) is not None :
438
438
decl .comment = attrs .get (XML_AN_COMMENT )
439
439
return decl
440
440
@@ -444,7 +444,7 @@ def __read_enumeration(self, attrs):
444
444
# it means that this is unnamed enum. in c++ enum{ x };
445
445
enum_name = ''
446
446
decl = self .__decl_factory .create_enumeration (name = enum_name )
447
- if attrs .get (XML_AN_COMMENT ):
447
+ if attrs .get (XML_AN_COMMENT ) is not None :
448
448
decl .comment = attrs .get (XML_AN_COMMENT )
449
449
self .__read_byte_size (decl , attrs )
450
450
self .__read_byte_align (decl , attrs )
@@ -569,7 +569,7 @@ def __read_calldef(self, calldef, attrs, is_declaration):
569
569
else :
570
570
calldef .does_throw = True
571
571
calldef .exceptions = throw_stmt .split ()
572
- if attrs .get (XML_AN_COMMENT ):
572
+ if attrs .get (XML_AN_COMMENT ) is not None :
573
573
calldef .comment = attrs .get (XML_AN_COMMENT )
574
574
575
575
def __read_member_function (self , calldef , attrs , is_declaration ):
@@ -621,7 +621,7 @@ def __read_variable(self, attrs):
621
621
XML_AN_INIT ),
622
622
bits = bits )
623
623
self .__read_byte_offset (decl , attrs )
624
- if attrs .get (XML_AN_COMMENT ):
624
+ if attrs .get (XML_AN_COMMENT ) is not None :
625
625
decl .comment = attrs .get (XML_AN_COMMENT )
626
626
return decl
627
627
@@ -640,7 +640,7 @@ def __read_class_impl(self, class_type, attrs):
640
640
decl .is_abstract = bool (attrs .get (XML_AN_ABSTRACT , False ))
641
641
self .__read_byte_size (decl , attrs )
642
642
self .__read_byte_align (decl , attrs )
643
- if attrs .get (XML_AN_COMMENT ):
643
+ if attrs .get (XML_AN_COMMENT ) is not None :
644
644
decl .comment = attrs .get (XML_AN_COMMENT )
645
645
return decl
646
646
0 commit comments