dwrap1<R> method

WF1<R> dwrap1<R>(
  1. String name
)

Binds a cwraped C function taking 1 argument and returning a plain (non-struct) value.

R determines the JS->Dart return conversion applied on every call (see _conv); use void if the C function returns nothing.

Implementation

WF1<R> dwrap1<R>(String name) {
  final f = _wn(name, 1);
  final c = _conv<R>();
  return (a1) => c(f.run([a1]));
}