Skip to content

Commit 6f89305

Browse files
committed
Filter private defines
1 parent 312321e commit 6f89305

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

bindgen/ir/IR.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ void IR::filterDeclarations(const std::string &excludePrefix) {
185185
filterByPrefix(functions, excludePrefix);
186186

187187
filterByPrefix(literalDefines, excludePrefix);
188+
189+
filterByPrefix(varDefines, excludePrefix);
188190
}
189191

190192
void IR::filterTypeDefs(const std::string &excludePrefix) {

tests/samples/VarDefine.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ extern int c;
77
#define C c
88
#undef C // removed
99

10+
extern float f;
11+
#define __PRIVATE f // should be filtered
12+
1013
int getA();

0 commit comments

Comments
 (0)