Skip to content

FFI varargs sample is brittle #152

Closed
@timsneath

Description

@timsneath

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions