Skip to content

Commit 19c15a8

Browse files
committed
Use new-style Python classes
1 parent 5782938 commit 19c15a8

File tree

10 files changed

+22
-22
lines changed

10 files changed

+22
-22
lines changed

pygccxml/binary_parsers/undname.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from .. import declarations
2222

2323

24-
class UNDECORATE_NAME_OPTIONS:
24+
class UNDECORATE_NAME_OPTIONS(object):
2525

2626
"""defines few constants for `UnDecorateSymbolName` function"""
2727

@@ -76,7 +76,7 @@ class UNDECORATE_NAME_OPTIONS:
7676
| UNDNAME_NO_ACCESS_SPECIFIERS | UNDNAME_NO_ECSU
7777

7878

79-
class undname_creator_t:
79+
class undname_creator_t(object):
8080

8181
"""implementation details - should not be used directly
8282

pygccxml/declarations/algorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def get_global_namespace(decls):
213213
raise RuntimeError("Unable to find global namespace.")
214214

215215

216-
class match_declaration_t:
216+
class match_declaration_t(object):
217217
"""
218218
Helper class for different search algorithms.
219219

pygccxml/declarations/calldef.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from .. import utils
2727

2828

29-
class VIRTUALITY_TYPES:
29+
class VIRTUALITY_TYPES(object):
3030

3131
"""class that defines "virtuality" constants"""
3232
NOT_VIRTUAL = 'not virtual'
@@ -37,7 +37,7 @@ class VIRTUALITY_TYPES:
3737
FUNCTION_VIRTUALITY_TYPES = VIRTUALITY_TYPES
3838

3939

40-
class CALLING_CONVENTION_TYPES:
40+
class CALLING_CONVENTION_TYPES(object):
4141

4242
"""class that defines "calling convention" constants"""
4343
UNKNOWN = ''

pygccxml/declarations/class_declaration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from pygccxml import utils
2020

2121

22-
class ACCESS_TYPES:
22+
class ACCESS_TYPES(object):
2323

2424
"""class that defines "access" constants"""
2525
PUBLIC = "public"
@@ -28,7 +28,7 @@ class ACCESS_TYPES:
2828
ALL = [PUBLIC, PRIVATE, PROTECTED]
2929

3030

31-
class CLASS_TYPES:
31+
class CLASS_TYPES(object):
3232

3333
"""class that defines "class" type constants"""
3434
CLASS = "class"

pygccxml/declarations/type_traits.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def is_fundamental(type):
365365
(cpptypes.volatile_t, cpptypes.const_t))
366366

367367

368-
class declaration_xxx_traits:
368+
class declaration_xxx_traits(object):
369369

370370
"""this class implements the functionality needed for convenient work with
371371
declaration classes
@@ -634,7 +634,7 @@ def is_binary_operator(oper):
634634
return False
635635

636636

637-
class __is_convertible_t:
637+
class __is_convertible_t(object):
638638

639639
"""implementation details"""
640640

@@ -1056,7 +1056,7 @@ def is_defined_in_xxx(xxx, cls):
10561056
return None is global_ns.parent
10571057

10581058

1059-
class impl_details:
1059+
class impl_details(object):
10601060

10611061
"""implementation details"""
10621062
@staticmethod
@@ -1133,7 +1133,7 @@ def find_value_type(global_ns, value_type_str):
11331133
return None
11341134

11351135

1136-
class internal_type_traits:
1136+
class internal_type_traits(object):
11371137

11381138
"""small convenience class, which provides access to internal types"""
11391139
# TODO: add exists function
@@ -1158,7 +1158,7 @@ def get_by_name(type_, name):
11581158
% (name, type_.decl_string))
11591159

11601160

1161-
class smart_pointer_traits:
1161+
class smart_pointer_traits(object):
11621162

11631163
"""implements functionality, needed for convenient work with
11641164
smart pointers"""
@@ -1188,7 +1188,7 @@ def value_type(type_):
11881188
return internal_type_traits.get_by_name(type_, "value_type")
11891189

11901190

1191-
class auto_ptr_traits:
1191+
class auto_ptr_traits(object):
11921192

11931193
"""implements functionality, needed for convenient work with
11941194
`std::auto_ptr` pointers"""

pygccxml/parser/directory_cache.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from . import declarations_cache
2828

2929

30-
class index_entry_t:
30+
class index_entry_t(object):
3131

3232
"""
3333
Entry of the index table in the directory cache index.
@@ -376,7 +376,7 @@ def _create_config_signature(self, config):
376376
return m.digest()
377377

378378

379-
class filename_entry_t:
379+
class filename_entry_t(object):
380380

381381
"""This is a record stored in the filename_repository_t class.
382382
@@ -423,7 +423,7 @@ def dec_ref_count(self):
423423
return self.refcount
424424

425425

426-
class filename_repository_t:
426+
class filename_repository_t(object):
427427

428428
"""File name repository.
429429

pygccxml/parser/project_reader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from .. import utils
1212

1313

14-
class COMPILATION_MODE:
14+
class COMPILATION_MODE(object):
1515
ALL_AT_ONCE = 'all at once'
1616
FILE_BY_FILE = 'file by file'
1717

@@ -53,7 +53,7 @@ class file_configuration_t(object):
5353
5454
"""
5555

56-
class CONTENT_TYPE:
56+
class CONTENT_TYPE(object):
5757
STANDARD_SOURCE_FILE = 'standard source file'
5858
CACHED_SOURCE_FILE = 'cached source file'
5959
GCCXML_GENERATED_FILE = 'gccxml generated file'
@@ -163,7 +163,7 @@ def create_cached_source_fc(header, cached_source_file):
163163
content_type=file_configuration_t.CONTENT_TYPE.CACHED_SOURCE_FILE)
164164

165165

166-
class project_reader_t:
166+
class project_reader_t(object):
167167

168168
"""parses header files and returns the contained declarations"""
169169

pygccxml/parser/source_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def bind_aliases(decls):
4848
cls_inst.aliases.append(decl)
4949

5050

51-
class source_reader_t:
51+
class source_reader_t(object):
5252
"""
5353
This class reads C++ source code and returns the declarations tree.
5454

pygccxml/utils/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def name_of(cls, enum_numeric_value):
300300
(enum_numeric_value, cls.__name__))
301301

302302

303-
class native_compiler:
303+
class native_compiler(object):
304304
"""
305305
Provides information about the compiler which was used to build the
306306
Python executable

unittests/autoconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
pygccxml.declarations.class_t.USE_DEMANGLED_AS_NAME = True
3333

3434

35-
class cxx_parsers_cfg:
35+
class cxx_parsers_cfg(object):
3636
gccxml = pygccxml.parser.load_xml_generator_configuration(
3737
'xml_generator.cfg',
3838
xml_generator_path=generator_path,

0 commit comments

Comments
 (0)