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

Remove type argument from structs #12

Merged
merged 2 commits into from
Oct 15, 2019
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
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 <[email protected]>
homepage: https://github.com/dart-lang/ffi
description: Utilities for working with Foreign Function Interface (FFI) code.
Expand Down