Mercurial > hg > orthanc
comparison OrthancFramework/Resources/CheckOrthancFrameworkSymbols.py @ 4279:ab4d015af660
moving inline methods to source files for ABI compatibility
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 03 Nov 2020 20:48:01 +0100 |
parents | c5ca798b158a |
children | b30a8de92ad9 |
comparison
equal
deleted
inserted
replaced
4278:9279de56a405 | 4279:ab4d015af660 |
---|---|
81 | 81 |
82 tu = index.parse(AMALGAMATION, | 82 tu = index.parse(AMALGAMATION, |
83 [ '-DORTHANC_BUILDING_FRAMEWORK_LIBRARY=1' ]) | 83 [ '-DORTHANC_BUILDING_FRAMEWORK_LIBRARY=1' ]) |
84 | 84 |
85 | 85 |
86 FILES = [] | |
87 COUNT = 0 | |
86 | 88 |
87 def ExploreNamespace(node, namespace): | 89 def ExploreNamespace(node, namespace): |
88 for child in node.get_children(): | 90 for child in node.get_children(): |
89 fqn = namespace + [ child.spelling ] | 91 fqn = namespace + [ child.spelling ] |
90 | 92 |
114 for j in i.get_children(): | 116 for j in i.get_children(): |
115 if j.kind == clang.cindex.CursorKind.COMPOUND_STMT: | 117 if j.kind == clang.cindex.CursorKind.COMPOUND_STMT: |
116 hasImplementation = True | 118 hasImplementation = True |
117 | 119 |
118 if hasImplementation: | 120 if hasImplementation: |
121 global FILES, COUNT | |
122 FILES.append(str(child.location.file)) | |
123 COUNT += 1 | |
124 | |
119 print('Exported public method with an implementation: %s::%s()' % | 125 print('Exported public method with an implementation: %s::%s()' % |
120 ('::'.join(fqn), i.spelling)) | 126 ('::'.join(fqn), i.spelling)) |
121 | 127 |
122 | 128 |
123 for node in tu.cursor.get_children(): | 129 for node in tu.cursor.get_children(): |
124 if (node.kind == clang.cindex.CursorKind.NAMESPACE and | 130 if (node.kind == clang.cindex.CursorKind.NAMESPACE and |
125 node.spelling == 'Orthanc'): | 131 node.spelling == 'Orthanc'): |
126 ExploreNamespace(node, [ 'Orthanc' ]) | 132 ExploreNamespace(node, [ 'Orthanc' ]) |
133 | |
134 | |
135 print('\nTotal of possibly problematic methods: %d' % COUNT) | |
136 | |
137 print('\nFiles:\n') | |
138 for i in sorted(list(set(FILES))): | |
139 print(i) | |
140 |