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

Fix travis #8

Merged
merged 1 commit into from
Oct 10, 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.1.1+1

* Fix documentation link

## 0.1.1

* Add basic Utf16 support
Expand Down
3 changes: 1 addition & 2 deletions lib/src/utf8.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ class Utf8 extends Struct<Utf8> {
/// Returns a malloc-allocated pointer to the result.
static Pointer<Utf8> toUtf8(String string) {
final units = utf8.encode(string);
final Pointer<Uint8> result =
allocate<Uint8>(count: units.length + 1);
final Pointer<Uint8> result = allocate<Uint8>(count: units.length + 1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have the dartfmt checks enabled in .travis.yaml? How could this have been committed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do. Could this be a change in a new version of dartfmt?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say it's unlikely because such a change could cause massives amounts of user code to need re-formatting (the formatter should be very stable).

Are those checks correctly configured for travis? I see that other repositories configure it differently, e.g. https://github.com/dart-lang/stack_trace/blob/master/.travis.yml :

matrix:
  include:
    # Only validate formatting using the dev release
    # Formatted with 1.23.0+ which has (good) changes since 1.22.1
    - dart: dev
      dart_task: dartfmt

(I don't know how to correctly configure travis)

final Uint8List nativeString =
result.asExternalTypedData(count: units.length + 1);
nativeString.setAll(0, units);
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: ffi
version: 0.1.1
version: 0.1.1+1
author: Dart Team <[email protected]>
homepage: https://github.com/dart-lang/ffi
description: Utilities for working with Foreign Function Interface (FFI) code.

environment:
sdk: '>=2.5.0-dev.2.1 <3.0.0'
documentation: http://www.dartdocs.org/documentation/ffi/latest
sdk: '>=2.5.0 <3.0.0'
documentation: https://pub.dev/documentation/ffi/

dependencies:

Expand Down