Skip to content

Audit foreign import ccall types #653

Open
@clyring

Description

In this comment it was noticed that we have a mismatch between the actual C prototype of sbs_elem_index and the foreign import in our Haskell code:

ptrdiff_t
sbs_elem_index(const void *s,
            int c,
            size_t n)
{ // ...
foreign import ccall unsafe "static sbs_elem_index"
    c_elem_index :: ByteArray# -> Word8 -> CSize -> IO CPtrdiff

Notice that for the second argument we have Word8 on the Haskell side and int on the C side.

I will audit our foreign imports for similar mistakes.

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions