Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkgs/ffi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions pkgs/ffi/lib/src/arena.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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>(T resource, void Function(T) releaseCallback) {
T using<T>(T resource, void Function(T res) releaseCallback) {
_ensureInUse();
releaseCallback = Zone.current.bindUnaryCallback(releaseCallback);
_managedResourceReleaseCallbacks.add(() => releaseCallback(resource));
Expand Down Expand Up @@ -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>(
R Function(Arena) computation, [
R Function(Arena arena) computation, [
Allocator wrappedAllocator = calloc,
]) {
final arena = Arena(wrappedAllocator);
Expand Down