Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

ABI-specific integers #128

Merged
merged 10 commits into from
Jan 20, 2022
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
fail-fast: false
matrix:
# Add macos-latest and/or windows-latest if relevant for this package.
os: [ubuntu-latest]
sdk: [2.12.0, dev]
os: [macos-latest, ubuntu-latest, windows-latest]
sdk: [2.16.0-124.0.dev, dev] # TODO(dacoharkes): Set to 2.16.0 after SDK release.
steps:
- uses: actions/checkout@v2
- uses: dart-lang/[email protected]
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.2.0-dev.0

Added common C integer types as ABI-specific integers. These common C integer
types will make their way into `dart:ffi` in 2.17 and be deprecated from this
package. Having them in this package enables using them in Dart 2.16.

This pre-release requires Dart `2.16.0-118.0.dev` or greater.

## 1.1.2

Fixed unhandled exception in `withZoneArena` (#107).
Expand Down
1 change: 1 addition & 0 deletions lib/ffi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

export 'src/allocation.dart' show calloc, malloc;
export 'src/arena.dart';
export 'src/c_type.dart';
export 'src/utf8.dart';
export 'src/utf16.dart';
4 changes: 0 additions & 4 deletions lib/src/allocation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ class _MallocAllocator implements Allocator {
/// Throws an [ArgumentError] if the memory pointed to by [pointer] cannot be
/// freed.
///
// TODO(dartbug.com/36855): Once we have a ffi.Bool type we can use it instead
// of testing the return integer to be non-zero.
@override
void free(Pointer pointer) {
if (Platform.isWindows) {
Expand Down Expand Up @@ -151,8 +149,6 @@ class _CallocAllocator implements Allocator {
/// Throws an [ArgumentError] if the memory pointed to by [pointer] cannot be
/// freed.
///
// TODO(dartbug.com/36855): Once we have a ffi.Bool type we can use it instead
// of testing the return integer to be non-zero.
@override
void free(Pointer pointer) {
if (Platform.isWindows) {
Expand Down
Loading