Skip to content

Commit 610a273

Browse files
committed
Remove declaration as parent class
Switch from using a declaration as the parent class of a comment. Instead, create a comment_t object for each declaration.
1 parent 624ffcc commit 610a273

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

pygccxml/declarations/comment.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
99
"""
1010

11-
12-
from . import declaration
1311
from . import location as pygccxml_location
1412

1513

16-
class comment_t(declaration.declaration_t):
14+
class comment_t():
1715

1816
def __init__(self, name='', declarations=None):
1917
"""
@@ -22,7 +20,6 @@ def __init__(self, name='', declarations=None):
2220
Args:
2321
2422
"""
25-
declaration.declaration_t.__init__(self, name)
2623
self._location = {}
2724
self._begin_line = 0
2825
self._begin_column = 0

pygccxml/declarations/declaration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
from . import declaration_utils
1515
from . import algorithms_cache
16+
from . import comment
1617

1718

1819
class declaration_t(object):
@@ -37,7 +38,7 @@ def __init__(
3738
self._cache = algorithms_cache.declaration_algs_cache_t()
3839
self._partial_name = None
3940
self._decorated_name = None
40-
self._comment = None
41+
self._comment = comment.comment_t()
4142

4243
def __str__(self):
4344
"""

0 commit comments

Comments
 (0)