Skip to content

FFI varargs sample is brittle #152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
timsneath opened this issue Aug 9, 2022 · 0 comments · Fixed by #153
Closed

FFI varargs sample is brittle #152

timsneath opened this issue Aug 9, 2022 · 0 comments · Fixed by #153
Labels

Comments

@timsneath
Copy link
Contributor

timsneath commented Aug 9, 2022

If varargs aren't supported in Dart FFI right now, should we be advertising them in this sample?

// C multi sum function - int multi_sum(int nr_count, ...);
//
// Example of how to call C functions with varargs with a fixed arg count in
// Dart
typedef MultiSumFunc = Int32 Function(
Int32 numCount, Int32 a, Int32 b, Int32 c);
typedef MultiSum = int Function(int numCount, int a, int b, int c);

Context:
dart-lang/sdk#49460 (comment)
dart-lang/sdk#38578 (comment)

/cc @dcharkes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants