Skip to content

Commit

Permalink
Remove type argument from structs (flutter#12)
Browse files Browse the repository at this point in the history
* Remove type argument from structs
* update version and changelog
  • Loading branch information
dcharkes authored Oct 15, 2019
1 parent b363e4a commit 092fa23
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## 0.1.2
## 0.1.3-dev.2

Incorporate struct API changes (drop type argument of structs).

## 0.1.3-dev.1

* Adds top-level `allocate<T>()` and `free()` methods which can be used as a
replacement for the deprecated `Pointer.allocate<T>()` and `Pointer.free()`
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utf16.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'package:ffi/ffi.dart';
///
/// [Utf16] is respresented as a struct so that `Pointer<Utf16>` can be used in
/// native function signatures.
class Utf16 extends Struct<Utf16> {
class Utf16 extends Struct {
/// Convert a [String] to a Utf16-encoded null-terminated C string.
///
/// If 'string' contains NULL bytes, the converted string will be truncated
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utf8.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final int _maxSize = sizeOf<IntPtr>() == 8 ? _kMaxSmi64 : _kMaxSmi32;
//
// TODO(https://github.com/dart-lang/ffi/issues/4): No need to use
// 'asExternalTypedData' when Pointer operations are performant.
class Utf8 extends Struct<Utf8> {
class Utf8 extends Struct {
/// Returns the length of a null-terminated string -- the number of (one-byte)
/// characters before the first null byte.
static int strlen(Pointer<Utf8> string) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: ffi
version: 0.1.3-dev.1
version: 0.1.3-dev.2
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/ffi
description: Utilities for working with Foreign Function Interface (FFI) code.
Expand Down

0 comments on commit 092fa23

Please sign in to comment.