diff --git a/pkgs/ffi/CHANGELOG.md b/pkgs/ffi/CHANGELOG.md index 06f45b86ec..53b1cac50b 100644 --- a/pkgs/ffi/CHANGELOG.md +++ b/pkgs/ffi/CHANGELOG.md @@ -1,6 +1,7 @@ -## 2.1.5-wip +## 2.1.5 - Update to the latest lints. +- Add default parameter names for callbacks. ## 2.1.4 diff --git a/pkgs/ffi/lib/src/arena.dart b/pkgs/ffi/lib/src/arena.dart index 37861370c0..1b3f26fb42 100644 --- a/pkgs/ffi/lib/src/arena.dart +++ b/pkgs/ffi/lib/src/arena.dart @@ -60,7 +60,7 @@ class Arena implements Allocator { /// /// Returns [resource] again, to allow for easily inserting /// `arena.using(resource, ...)` where the resource is allocated. - T using(T resource, void Function(T) releaseCallback) { + T using(T resource, void Function(T res) releaseCallback) { _ensureInUse(); releaseCallback = Zone.current.bindUnaryCallback(releaseCallback); _managedResourceReleaseCallbacks.add(() => releaseCallback(resource)); @@ -118,7 +118,7 @@ class Arena implements Allocator { /// If the isolate is shut down, through `Isolate.kill()`, resources are _not_ /// cleaned up. R using( - R Function(Arena) computation, [ + R Function(Arena arena) computation, [ Allocator wrappedAllocator = calloc, ]) { final arena = Arena(wrappedAllocator);