Skip to content

[ffigen] Fix some minor bugs - #3517

Open
liamappelbe wants to merge 1 commit into
mainfrom
ffigen_nits
Open

[ffigen] Fix some minor bugs#3517
liamappelbe wants to merge 1 commit into
mainfrom
ffigen_nits

Conversation

@liamappelbe

Copy link
Copy Markdown
Contributor

Fix 2 small issues that came up during the big config refactor.

  • C function signatures with an empty arg list should codegen as (void) instead of ()
  • There were cases where we were using @Native symbol loads without setting @DefaultAsset

Bumping to 22.0.0-wip too since I'm about to do that anyway.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Package publishing

If you have publishing permissions, you can use the links below to publish the changes after merging this PR.

Package Version Status Publish tag (post-merge)
package:code_assets 1.3.0-wip WIP (no publish necessary)
package:data_assets 0.20.0 already published at pub.dev
package:ffi 2.2.0 already published at pub.dev
package:hooks 2.2.0-wip WIP (no publish necessary)
package:hooks_runner 1.6.2-wip WIP (no publish necessary)
package:jni_flutter 1.0.2 already published at pub.dev
package:jni_util 1.0.0 already published at pub.dev
package:native_toolchain_c 0.19.4-wip WIP (no publish necessary)
package:record_use 1.1.0 ready to publish record_use-v1.1.0
package:swift2objc 0.3.0-wip WIP (no publish necessary)
package:swiftgen 0.1.3 already published at pub.dev

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

PR Health

Changelog Entry
Package Changed Files
package:objective_c pkgs/objective_c/lib/src/objective_c_bindings_generated.dart
pkgs/objective_c/pubspec.yaml

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbol Leaking sources

This check can be disabled by tagging the PR with skip-leaking-check.

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
objective_c None 9.5.0 9.5.0 9.5.0 ✔️

This check can be disabled by tagging the PR with skip-breaking-check.

@goderbauer goderbauer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

final returnTypeStr = returnType.getNativeType(context);
return '$returnTypeStr (*$varName)(${arg.join(', ')})';
final argStr = arg.isEmpty ? 'void' : arg.join(', ');
return '$returnTypeStr (*$varName)($argStr)';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we cover this change with a test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants