We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed3fc82 commit c80fbe4Copy full SHA for c80fbe4
pkgs/ffigen/lib/src/header_parser/sub_parsers/var_parser.dart
@@ -28,8 +28,9 @@ Binding? parseVarDeclaration(Context context, clang_types.CXCursor cursor) {
28
final decl = Declaration(usr: usr, originalName: name);
29
final cType = cursor.type();
30
31
- // Try to evaluate as a constant first.
32
- if (cType.isConstQualified) {
+ // Try to evaluate as a constant first,
+ // unless the config asks for the variable's address.
33
+ if (cType.isConstQualified && !config.globals.includeSymbolAddress(decl)) {
34
final evalResult = clang.clang_Cursor_Evaluate(cursor);
35
final evalKind = clang.clang_EvalResult_getKind(evalResult);
36
Constant? constant;
0 commit comments