Xo is experimental. The source code is not public yet; it will be soon. Read the release notes
Menu · XO1105

Docs

XO1105: C function exists in the header but its signature does not map to Xo

error · reported by the checker

The header declares this function, but a parameter or the result is a type the boundary does not carry (decision 0093): an output pointer, a mutable buffer, a char * result whose owner is unknown, a pointer to a struct the header defines, a function pointer, an array, or a variadic list. The binding maps scalars, const char * (Str), a const byte pointer followed by an integer length (Str or Bytes), flat structs of scalars (copied), and pointers to structs the header leaves undefined (opaque handles). Skipped names and their reasons are listed at the top of the generated binding. Write a small C wrapper with a mappable signature, declare it in a header of your module, and bind that header. See core 4.4 and decision 0116.

Example

use c "zlib.h" link "z"

fn f() -> Int32 uses ffi {
  zlib.deflate_end()
}

Fix

use c "zlib.h" link "z"

fn f(data: Bytes) -> UInt64 uses ffi {
  zlib.crc32(0, data)
}

Run xo explain XO1105 for this text in a terminal, or see section 10.6 of the specification.