SYZ_CAPI syz_ErrorCode syz_createBufferFromStream(syz_Handle *out, const char *protocol, const char *path, const char *options);
I've run the header file through ffigen, and is working well so far.
int syz_createBufferFromStream(
ffi.Pointer<ffi.Uint64> out,
ffi.Pointer<ffi.Int8> protocol,
ffi.Pointer<ffi.Int8> path,
ffi.Pointer<ffi.Int8> options,
) {
return _syz_createBufferFromStream(
out,
protocol,
path,
options,
);
}
First of all, is this right? I don't know enough C or C++ to know the difference, but the C++ method (the first code example) wants protocol, path and options given as const char * but the dart version is expecting Pointer<Int8>. Assuming that dart and ffigen know more about C++ than I do, how do I convert a normal string to this pointer type?
I thought the
StringUtf8Pointer extension would help, but that returns a Pointer<Utf8>.
Any help would be greatly appreciated. Thanks in advance.