export methods obviously

master
Sergey Marinkevich 8 months ago
parent 000df8a64b
commit 52ca9c547b

@ -2,7 +2,7 @@
class __attribute__((annotate("export"))) ICounter {
public:
virtual int getval() const = 0;
virtual int __attribute__((annotate("export"))) getval() const = 0;
virtual void inc() = 0;
void helper(); // не виртуальный — не экспортируем

@ -35,7 +35,7 @@ def main():
if cursor.kind == CursorKind.CLASS_DECL and has_annotation(cursor, "export"):
print(f"Found exported class: {cursor.spelling}")
for c in cursor.get_children():
if c.kind == CursorKind.CXX_METHOD:
if c.kind == CursorKind.CXX_METHOD and has_annotation(c, "export"):
is_virtual = c.is_virtual_method()
print(f" method: {c.spelling} (virtual={is_virtual})")

Loading…
Cancel
Save