Skip to content

Commit 5ee6394

Browse files
authored
Merge pull request #107 from adeepkit01/fixnullcomparison
handle null comparison
2 parents b04340f + 8f9e5f9 commit 5ee6394

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pygccxml/declarations/calldef.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ def __ne__(self, other):
8585
def __lt__(self, other):
8686
if not isinstance(other, self.__class__):
8787
return self.__class__.__name__ < other.__class__.__name__
88+
if other.default_value == None:
89+
return False
90+
if self.default_value == None:
91+
return self.name < other.name \
92+
and self.decl_type < other.decl_type
8893
return self.name < other.name \
8994
and self.default_value < other.default_value \
9095
and self.decl_type < other.decl_type

0 commit comments

Comments
 (0)