c2hsc
c2hsc copied to clipboard
Utility for creating .hsc files from C API header files
I had fix the issue #38 , and add one test case for this issue. All tests have been tested and passed.
C ```c typedef const PCRE2_UCHAR8 *PCRE2_SPTR8; ``` hsc ``` #globalvar PCRE2_SPTR8 , Ptr CUChar ``` should be ``` #synonym_t PCRE2_SPTR8 , Ptr CUChar ```
Hi, would it be possible to have a new release including this fix ? https://github.com/jwiegley/c2hsc/commit/62fe5dbc6691f95c6f303b76a90d8b41a9410b5d The package is marked as broken because of this while it works (see https://github.com/NixOS/nixpkgs/issues/63764). For...
`typedef int * bug;` becomes `type C'bug = CInt` instead of `type C'bug = Ptr CInt`: `$ c2hsc --version` ``` c2hsc v0.6.4, (C) John Wiegley 2012 ``` `$ cat bug.h`...
Maybe it's ok to upgrade the dependency on logging? I get the following error while building with LTS-13.0 ``` Error: While constructing the build plan, the following exceptions were encountered:...
I'm new to FFI. I run this tool, i get a hsc file. I think i can just put it in the hsc2hs tool. But i get an error of...
`c2hsc glibc/include/sched.h` lacks `unshare()` because its in `bits/sched.h` but ``` [nix-shell:~/apps/nixos-configs/namespacer]$ c2hsc glibc/include/bits/sched.h glibc/include/bits/sched.h:24:3: error: #error "Never include directly; use instead." # error "Never include directly; use instead." ^~~~~ ```...
Right now `long double` becomes `CDouble` and `double long` becomes `CLong`, neither of which is correct.
This code: ``` c #ifndef MY_TYPES_H #define MY_TYPES_H typedef int MyArray[20]; typedef struct { MyArray x; } MyStruct; #endif // MY_TYPES_H ``` produces this code: ``` haskell {-# OPTIONS_GHC -fno-warn-unused-imports...