Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions hs-bindgen/examples/golden/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ struct Example {
int sudoku[3][3];
};

//! Typedef-in-typedef
typedef triplet sudoku[3];

/*
* Globals
*/
Expand Down Expand Up @@ -107,6 +110,9 @@ int fun_7(int xss[][3]);
//! Multi-dimensional array of unknown size, typedef
int fun_8(tripletlist xss);

//! Typedef-in-typedef
int isSolved(sudoku xss);

/*
* Function results
*
Expand Down Expand Up @@ -139,3 +145,6 @@ int (*fun_15(void))[][3];

//! Multi-dimensional array of unknown size, typedef
tripletlist *fun_16(void);

//! Typedef-in-typedef
sudoku * solve(void);
3 changes: 2 additions & 1 deletion hs-bindgen/fixtures/adios.hs
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,8 @@
"/* get_\978\978\978_ptr */ __attribute__ ((const)) signed int const *hs_bindgen_test_adios_c538a25ba7055dd4 (void) { return &\978\978\978; } ",
capiWrapperImport = "adios.h"},
foreignImportOrigin = Global
(TypeConst
(TypeQualified
TypeQualifierConst
(TypePrim
(PrimIntegral PrimInt Signed))),
foreignImportComment = Nothing,
Expand Down
3 changes: 2 additions & 1 deletion hs-bindgen/fixtures/adios.tree-diff.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ TranslationUnit {
headerInclude = "adios.h"},
declComment = Nothing},
declKind = DeclGlobal
(TypeConst
(TypeQualified
TypeQualifierConst
(TypePrim
(PrimIntegral PrimInt Signed))),
declSpec = DeclSpec
Expand Down
8 changes: 8 additions & 0 deletions hs-bindgen/fixtures/array.bindingspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ types:
- Eq
- Show
- Storable
- headers: array.h
cname: sudoku
module: Example
hsname: Sudoku
instances:
- Eq
- Show
- Storable
- headers: array.h
cname: triplet
module: Example
Expand Down
Loading