Closed craiglabenz closed 1 month ago
CI is failing because this refactors code that was in use elsewhere, but I want to make sure the utilities are correct before propagating their changes everywhere. However, those updates are quite trivial.
Obsolete.
Adds helpers for converting between Dart and native memory for the following scenarios:
Float32List
<->Pointer<Float>
Uint8List
<->Pointer<Char>
String
<->Pointer<Char>
List<String>
<->Pointer<Pointer<Char>>
Some of this functionality already existed, and some of it is new to this PR. Where the functionality already existed, the implementations were consolidated on extension methods instead of free-floating functions. Also, methods to convert from native memory to Dart types now return nullable types instead of throwing exceptions on null pointers.
Replaces #18
cc @Piinks