12 Commits

Author SHA1 Message Date
kavoor 5b418d968c Support rename rule for union body members.
Closes #751.
2022-04-19 11:22:04 +02:00
Emilio Cobos Álvarez 09284108eb enumeration: simplify standard types in variants.
Fixes #745
2022-04-04 20:25:01 +02:00
Marc-André Lureau ccea33ecb4 tests: check renaming enum affects variant prefix
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-03-29 14:08:02 +02: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 1c1d4754ce tests: Remove Cython-specific configs 2020-11-25 17:30:30 +01:00
John VanEnk 8048748419 Add a test that demonstrates Style::Tag can emit structures with incorrect sizes in C. 2020-01-26 04:43:27 +01:00
Evan Shaw 6a9066f7cd Add enum_class option
This option allows specifying that a C++ enum should be emitted with
plain `enum` rather than `enum class`. It's true that `enum class` should
generally be preferred, but sometimes there's existing code which is
already using plain `enum`, and porting that code to Rust becomes easier when
`cbindgen` can emit plain `enum`.

This option can be overridden on a per-enum basis using a `cbindgen:` annotation.

It defaults to true for two reasons:

* Backward compatibility.
* `enum class` is probably actually what you want, in general.
2019-12-29 12:55:59 +01:00
Aleksa Sarai 8c66c0c1dc tests: enum: add #[repr(u64)] test
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2019-12-22 14:06:12 +01:00
Emilio Cobos Álvarez 9b5dd80d84 Stop including <uchar.h>, and instead map Rust char to uint32_t.
This is technically a breaking change for C++, unfortunately.

Fixes #423.
2019-12-04 00:03:38 +01:00
Adrian Wong 9b1fd8ecca Fix missing C header for char32_t 2019-12-02 19:55:04 +01:00
Wodann 24f69ecc9b Update test expecations based on newline change 2019-06-01 10:59:47 +09:00
Wodann 82da3c0afa Add separate test expectations for C headers with C++ compatibility 2019-06-01 10:57:52 +09:00