1092 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez 8236c82679 v0.17.0
* Add with_parse_extra_bindings to builder. (#645)
 * Support NonZero and fix incorrect simplification of Option<ptr> into ptr. (#647)
 * Deal with name conflicts correctly in declaration type resolution. (#651)
 * Support pointers to ZSTs. (#656)
2021-02-01 13:57:43 +01:00
Emilio Cobos Álvarez 3d41d33ffe config: Deal with clippy lints -.-. 2021-02-01 13:56:45 +01:00
Emilio Cobos Álvarez c5c301b08a ir: Support pointers to zsts.
Fixes #654
2021-02-01 13:56:45 +01:00
Ivan Enderlin d3cd22bc6f doc: Document the documentation config entry. 2021-02-01 13:53:02 +01:00
Emilio Cobos Álvarez d0d287f9f3 parser: Deal with a new clippy warning. 2021-01-26 12:55:05 +01:00
Emilio Cobos Álvarez 750745831a ir: Deal with name conflicts correctly in declaration type resolution.
So, basically, make opaque items last, and make previous names override
them.

Fixes #649
2021-01-26 12:55:05 +01:00
Emilio Cobos Álvarez c47ee1516b ir: Handle NonZero and simplify Option<NonZero> like we simplify Option<NonNull>.
Fixes #646
2021-01-14 23:39:59 +01:00
Emilio Cobos Álvarez f922f68531 ir: Avoid generating bogus pointer arguments.
Now that we track nullability in the pointer type it's easy to do it.

Fixes #223
2021-01-14 23:39:59 +01:00
Emilio Cobos Álvarez 4ba7d1f083 ir: Make simplify_standard_types less clone-happy. 2021-01-14 23:39:59 +01:00
Emilio Cobos Álvarez 2e1be24167 ir: Give integers a more structured representation. 2021-01-14 23:39:59 +01:00
Emilio Cobos Álvarez b9cfb34d29 Reintroduce clippy checks (#643) 2021-01-14 19:41:13 +01:00
Philipp Kaiser ee01884d90 [#644] Add parse extra bindings to builder 2021-01-08 16:49:24 +01:00
Luni-4 428ae2c6c9 Add a comment to explain release notes code 2021-01-04 18:39:35 +01:00
Luni-4 3a352e92a5 Fix clippy warnings 2021-01-04 17:43:12 +01:00
Luni-4 5698270518 ci: reintroduce clippy checks 2021-01-04 17:31:46 +01:00
Emilio Cobos Álvarez 4e578fb2da Fix typo in config option.
Fixes #641.
2021-01-04 15:41:50 +01:00
Luni-4 35afe47d0d Format release notes in a better way 2021-01-04 15:40:56 +01:00
Arnaud 14d1404455 Remove the 'TODO' and the #[allow(clippy::ptr_arg)] attribute 2021-01-04 15:34:48 +01:00
Arnaud ab7b0409bf Replace &String with &str in Parser::should_parse_dependency's arguments
As the TODO suggested, this involves replacing some calls to `contains()`
with `iter().any()`
2021-01-04 15:34:48 +01:00
Emilio Cobos Álvarez 30c642cac4 Test that cargo test in cargo package dir succeeds. 2020-12-26 18:45:35 +01:00
Emilio Cobos Álvarez 59f7b63280 Skip profiles test in package.
See https://github.com/rust-lang/cargo/issues/9017

Fixes #637.
2020-12-26 18:45:35 +01:00
Emilio Cobos Álvarez 1264d4c054 Minor metadata updates, rewrap README. 2020-12-21 00:24:24 +01:00
Emilio Cobos Álvarez a00b4215a9 v0.16.0
* Remove artificial restriction on lifetime parameters on enums (#604)
 * Add an option for converting usize/isize into size_t/ptrdiff_t. (#606)
 * Allow controlling the cargo profile used for expansion. (#607)
 * Support wider range of expressions in enum discriminants (#614)
 * Support generation of Cython bindings (#590)
 * Fixed some issues with style=tag and recursive structs (#615)
 * Default C style to Both (as specified in docs) (#615)
 * Fix resolution of path dependencies from certain modules. (#629)
 * Support inlined definitions for tuple variants with a single field in C (#631)

Thanks to all the awesome contributors that contributed to this release.
2020-12-21 00:07:32 +01:00
Vadim Petrochenkov b82e375254 enum: Support inlined definitions for tuple variants with a single field 2020-12-09 19:38:21 +01:00
Vadim Petrochenkov eaf3e57e74 enum: Remove some redundant function parameters 2020-12-09 19:38:21 +01:00
Vadim Petrochenkov 0083c43e13 Remove Struct::tuple_struct
It was used for adding `_` to names of numeric fields, but with inlined variants it isn't correct, so now we add `_` only if the field actually starts with a non-identifier character (a digit).
2020-12-09 19:38:21 +01:00
Vadim Petrochenkov 8a5db0baeb Minor cleanup to fn close_brace 2020-12-09 19:38:21 +01:00
Yurii Rashkovskii 1963f0c92e Partially support #[cfg]s on fields 2020-12-06 13:10:15 +01:00
Vadim Petrochenkov dfcee869ba enum: Do not forget to rename entities in enum discriminants 2020-12-06 01:53:09 +01:00
Emilio Cobos Álvarez fbc2237b7d parser: Fix resolution of #[path] dependencies from certain modules.
We need the current mod dir to resolve #[path], not the one we get for
rust 2018.

Fixes #599
2020-11-30 19:44:45 +01:00
Vadim Petrochenkov 9f558e30f3 enum: enum_name -> tag_name 2020-11-30 11:59:02 +01:00
Vadim Petrochenkov 8997277cb7 enum: Break up Enum::write into multiple functions 2020-11-30 11:59:02 +01:00
Vadim Petrochenkov f564c6a5f4 enum: Add some comments to enum writer 2020-11-30 11:59:02 +01:00
Vadim Petrochenkov 5bef63630f enum/struct: Avoid some ambiguous naming 2020-11-30 11:59:02 +01:00
Vadim Petrochenkov 3d6717c5bc enum: Move generation of derived functions into a separate method 2020-11-30 11:59:02 +01:00
Vadim Petrochenkov 7980288a94 Reenable some tests 2020-11-27 01:31:01 +01:00
Vadim Petrochenkov 98b7a3f9b9 cython: Leave out values of constants and enumerators
Keep them as documentation only
2020-11-27 01:31:01 +01:00
Vadim Petrochenkov 1b7976c88e ci: Check cargo test with minimim supported Rust version 2020-11-26 13:40:36 +01:00
Jordan Rose 198157b53f tests: Provide a fallback for CARGO_BIN_EXE_ for earlier Rusts 2020-11-26 11:04:20 +01:00
Vadim Petrochenkov 50fe950c40 cython: Fix a non-reproducible test 2020-11-26 11:02:28 +01:00
Vadim Petrochenkov 313827941d cython: Add comments about unsupported conditional enum variants 2020-11-26 11:02:28 +01:00
Wodann 68a1e65875 fix: default style to Both (as specified in docs)
Closes #615.
Closes #215.

Possibly closes others.
2020-11-25 18:04:30 +01:00
Wodann 5b5b46b7d6 fix: resolve path types for 'both' style 2020-11-25 17:55:58 +01:00
Emilio Cobos Álvarez 85a2f4c956 tests: Remove unneeded test file. 2020-11-25 17:50:38 +01:00
Vadim Petrochenkov b0aae44c77 Add two Cython-specific options to the config 2020-11-25 17:33:38 +01:00
Vadim Petrochenkov 1c1d4754ce tests: Remove Cython-specific configs 2020-11-25 17:30:30 +01:00
Vadim Petrochenkov 51405d1277 Support generation of Cython bindings 2020-11-17 15:27:34 +01:00
Vadim Petrochenkov a689bcabc7 Support an annotation for generating bitfield sizes in C code (: SIZE)
Closes #609
Closes #611
2020-10-31 17:05:49 +01:00
Vadim Petrochenkov dc12952e19 Keep annotations on fields 2020-10-31 17:05:37 +01:00
Vadim Petrochenkov 62e51b5e33 Factor out Field into a separate structure 2020-10-31 17:05:37 +01:00