summaryrefslogtreecommitdiff
path: root/bindgen-integration
AgeCommit message (Collapse)Author
2018-01-29ir: Choose the right mangling for destructors on all codepaths.Emilio Cobos Álvarez
Fixes #1133.
2017-12-29Don't generate symbols for pure virtual functions.Emilio Cobos Álvarez
Fixes #1197.
2017-11-21Support bitfield allocation units larger than 64 bitsNick Fitzgerald
Individual bitfields are still limited to at most 64 bits, but this restriction can be weakened when Rust supports u128. This implements issue #816. Usage notes: * Since common code is added to each generated binding, a program which uses more than one binding may need to work around the duplication by including each binding in its own module. * The values created by bitfield allocation unit constructors can be assigned directly to the corresponding struct fields with no need for transmutation. Implementation notes: __BindgenBitfieldUnit represents a bitfield allocation unit using a Storage type accessible as a slice of u8. The alignment of the unit is inherited from an Align type by virtue of the field: align: [Align; 0], The position of this field in the struct is irrelevant. The alignment of the Storage type is intended to be no larger than the alignment of the Align type, which will be true if the Storage type is, for example, an array of u8. Although the double underscore (__) prefix is reserved for implementations of C++, there are precedents for this convention elsewhere in bindgen and so the convention is adopted here too. Acknowledgement: Thanks to @fitzgen for an initial implementation of __BindgenBitfieldUnit and code to integrate it into bindgen.
2017-11-16Improve documentation of the integration testsGlyn Normington
Also: * disable rustfmt in the integration test, to avoid it causing problems, since it is not needed. * note the need to rebuild bindgen when running a single test.
2017-10-11Handle explicit align=1.Sergey Pepyakin
2017-09-11Make bindgen generate enums as constants by defaultCldfire
Also simplifies the logic that determines which enum variation gets chosen.
2017-06-19Auto merge of #763 - rigelk:757-unstable-defaults, r=emilio,fitzgenbors-servo
switch defaults from generating unstable Rust to generating stable Rust As said in the issue: - changing the Builder::no_unstable_rust method to the Builder::unstable_rust method - changing the --no-unstable-rust flag to a --unstable-rust flag in src/options.rs - changing bindgen-flags header in the test headers to remove the --no-unstable-rust flag - removing --no-unstable-rust flag in ./test/test-one.sh Fixes #757 r? @fitzgen
2017-06-19switch defaults from generating unstable Rust to generating stable RustPierre-Antoine Rault
- changing the Builder::no_unstable_rust method to the Builder::unstable_rust method - changing the --no-unstable-rust flag to a --unstable-rust flag in src/options.rs - changing bindgen-flags header in the test headers to remove the --no-unstable-rust flag Fixes #757
2017-06-18codegen: Fix bitfield getter/setters so they work with NPOT sizes.Emilio Cobos Álvarez
2017-06-05ir: Fix a bunch of bitfield correctness issues.Emilio Cobos Álvarez
In particular, the "flush the allocation unit" logic is only valid for ms_structs (that is, MSVC). It's slightly annoying to have this different behavior, but it'd work just fine if we'd turn that on for MSVC. This patch doesn't do that, yet at least, and adds tests for all the weird bitfield alignments around. Fixes #726 (and another set of hidden issues by the old code).
2017-05-25Allow asserting expectations across different libclang versionsNick Fitzgerald
Rather than having a tests that we only run if libclang >= 3.9, this makes the test suite dynamically detect when we have different expectations for different libclang versions. It does this by adding `tests/expectations/tests/libclang-$VERSION` directories, and `testing_only_libclang_$VERSION` features that are consulted when the usual expectation file does not exist. Fixes #697
2017-05-19Add bitfield allocation unit constructorsNick Fitzgerald
This commit gives bindgen the ability to generate constructors for bitfield allocation units. This enables more ergonomic use of struct literals for bindings structs that contain bitfields. Additionally, when we are generating unstable Rust, these constructors are marked as const functions. This enables the creation of const binding structs that contain bitfields.
2017-04-17Add Builder::clang_args (plural)Simon Sapin
Use AsRef<str> rather than Into<String> because &&str (what you get when iterating &[&str]) does not implement the latter.
2017-04-04codegen: Add integration tests for destructors.Emilio Cobos Álvarez
2017-03-17Renamed chooser to visitor and added function for parsed macro analysis.Adam Baxter
Added tests and fixed missed function rename. Fixed nits Renamed visitor to callbacks. Renamed visitor to callbacks. Renamed visitor to callbacks. Fixed text.
2017-03-09Reintroduce bitfield accessorsNick Fitzgerald
This commit reintroduces accessor methods for bitfields in the generated bindings. Fixes #519
2017-02-09remove underscore prefix from feature namefaineance
2017-02-09rename llvm_stable feature, and remove references from docsfaineance
2017-01-30tests: Add an integration test for static arrays.Emilio Cobos Álvarez
Turns out they were broken before https://github.com/servo/rust-bindgen/issues/456. Let's test it so it doesn't regress.
2017-01-24codegen: Fix typedef re-export in namespaces when bindings aren't at the root.Emilio Cobos Álvarez
2017-01-23Unify under the `bindgen` name.Emilio Cobos Álvarez
2017-01-13codegen: Fix use generation for non-root module.Emilio Cobos Álvarez
2016-12-23bindgen-integration: run `cargo fmt`Emilio Cobos Álvarez
2016-12-13Fix travisEmilio Cobos Álvarez
2016-12-13Add support for constructors, and integration tests.Emilio Cobos Álvarez