Audit `foreign import ccall` types
- Ngôn ngữ chính
- Haskell
- Star
- 301
- Fork
- 144
- Merge trung bình
- 7 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.