Audit `foreign import ccall` types
未关闭
bug
- 主要语言
- Haskell
- 星标
- 301
- 派生
- 144
- 平均合并
- 7 天 22 小时
- 30 天内合并 PR
- 1
描述
In [this comment](https://github.com/haskell/bytestring/pull/631#discussion_r1451112873) 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:
```c
ptrdiff_t
sbs_elem_index(const void *s,
int c,
size_t n)
{ // ...
```
```haskell
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.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。