Skip to content

Commit b632d7e

Browse files
committed
Merge branch 'hotfix/v1.8.5'
2 parents 69e78cf + 5b07065 commit b632d7e

16 files changed

+135
-27
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
Changes
22
=======
33

4+
Version 1.8.5
5+
-------------
6+
7+
1. Fix multiple calls to ``` __hash__()``` (#70)
8+
9+
2. ```Static``` and ```extern``` qualifiers are now no more treated as equivalents
10+
in the type_qualifiers class (for ```CastXML```).
11+
The old behaviour is kept for ```GCC-XML``` (```static == extern```).
12+
13+
3. Fix for ```declarations.is_noncopyable``` when used on a ```pointer_t```.
14+
415
Version 1.8.4
516
-------------
617

pygccxml/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@
4040
# TODO:
4141
# 1. Add "explicit" property for constructors
4242

43-
__version__ = '1.8.4'
43+
__version__ = '1.8.5'

pygccxml/declarations/calldef.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,12 @@ def __eq__(self, other):
264264

265265
def __hash__(self):
266266
if "GCC" in utils.xml_generator:
267-
return (super.__hash__(self) ^
267+
return (super(calldef_t, self).__hash__() ^
268268
hash(self.return_type) ^
269269
hash(self.demangled_name))
270270
elif "CastXML" in utils.xml_generator:
271271
# No demangled name with castxml. Use the normal name.
272-
return (super.__hash__(self) ^
272+
return (super(calldef_t, self).__hash__() ^
273273
hash(self.return_type) ^
274274
hash(self.name))
275275

pygccxml/declarations/calldef_members.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __eq__(self, other):
6464
and self.has_const == other.has_const
6565

6666
def __hash__(self):
67-
return super.__hash__(self)
67+
return super(member_calldef_t, self).__hash__()
6868

6969
@property
7070
def virtuality(self):

pygccxml/declarations/cpptypes.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -924,18 +924,20 @@ class type_qualifiers_t(object):
924924

925925
"""contains additional information about type: mutable, static, extern"""
926926

927-
def __init__(self, has_static=False, has_mutable=False):
927+
def __init__(self, has_static=False, has_mutable=False, has_extern=False):
928928
self._has_static = has_static
929+
self._has_extern = has_extern
929930
self._has_mutable = has_mutable
930931

931932
def __eq__(self, other):
932933
if not isinstance(other, type_qualifiers_t):
933934
return False
934935
return self.has_static == other.has_static \
936+
and self.has_extern == other.has_extern \
935937
and self.has_mutable == other.has_mutable
936938

937939
def __hash__(self):
938-
return super.__hash__(self)
940+
return super(type_qualifiers_t, self).__hash__()
939941

940942
def __ne__(self, other):
941943
return not self.__eq__(other)
@@ -944,6 +946,7 @@ def __lt__(self, other):
944946
if not isinstance(other, type_qualifiers_t):
945947
return object.__lt__(self, other)
946948
return self.has_static < other.has_static \
949+
and self.has_extern < other.has_extern \
947950
and self.has_mutable < other.has_mutable
948951

949952
@property
@@ -956,12 +959,11 @@ def has_static(self, has_static):
956959

957960
@property
958961
def has_extern(self):
959-
"""synonym to static"""
960-
return self.has_static
962+
return self._has_extern
961963

962964
@has_extern.setter
963965
def has_extern(self, has_extern):
964-
self.has_static = has_extern
966+
self._has_extern = has_extern
965967

966968
@property
967969
def has_mutable(self):

pygccxml/declarations/enumeration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __eq__(self, other):
4747
return self.values == other.values
4848

4949
def __hash__(self):
50-
return super.__hash__(self)
50+
return super(enumeration_t, self).__hash__()
5151

5252
def _get__cmp__items(self):
5353
"""implementation details"""

pygccxml/declarations/scopedef.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def __eq__(self, other):
228228
# return self_decls == other_decls
229229

230230
def __hash__(self):
231-
return super.__hash__(self)
231+
return super(scopedef_t, self).__hash__()
232232

233233
def _get_declarations_impl(self):
234234
raise NotImplementedError()

pygccxml/declarations/type_traits_classes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class declaration_xxx_traits(object):
5656
- get reference to the declaration
5757
"""
5858
sequence = [
59+
type_traits.remove_pointer,
5960
type_traits.remove_alias,
6061
type_traits.remove_cv,
6162
type_traits.remove_declarated]

pygccxml/declarations/typedef.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __eq__(self, other):
4444
return self.decl_type == other.decl_type
4545

4646
def __hash__(self):
47-
return super.__hash__(self)
47+
return super(typedef_t, self).__hash__()
4848

4949
@property
5050
def type(self):

pygccxml/declarations/variable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def __eq__(self, other):
6161
and self.bits == other.bits
6262

6363
def __hash__(self):
64-
return super.__hash__(self)
64+
return super(variable_t, self).__hash__()
6565

6666
@property
6767
def type(self):

0 commit comments

Comments
 (0)