Skip to content

Commit 8cfd998

Browse files
committed
Filter extern variables by prefix
1 parent 6d8db2a commit 8cfd998

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

bindgen/ir/IR.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ void IR::filterDeclarations(const std::string &excludePrefix) {
201201
filterByPrefix(literalDefines, excludePrefix);
202202

203203
filterByPrefix(varDefines, excludePrefix);
204+
205+
filterByPrefix(variables, excludePrefix);
204206
}
205207

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

tests/samples/PrivateMembers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ __private_type *getPrivateType();
4141
void usesPrivateUnion(union __unionWithPrivateName);
4242
void usesPrivateStruct(struct structWithPrivateType *, struct normalStruct *);
4343
void usesPrivateEnum(enum __privateEnum *);
44+
45+
extern int __private_var;

0 commit comments

Comments
 (0)