Age | Commit message (Collapse) | Author |
|
This is mostly a work around https://github.com/servo/rust-bindgen/issues/426,
until we implement the proper fix.
|
|
Forward declared structs now generate opaque enums
@emilio : I checked the test outputs again, and it seems that these changes are affecting struct *definitions* as well. Hence, I have not committed the test changes yet.
Fixes #62
|
|
|
|
codegen: Respect original repr for bitfield-like enums, add a constifying variant.
r? @fitzgen
Fixes #430
|
|
Honor and expose the derive_debug option.
Fixes #432
r? @fitzgen
|
|
codegen: Fix typedef re-export in namespaces when bindings aren't at the root.
|
|
Fixes #432
|
|
variant.
|
|
There's just no advantage in doing so.
|
|
The problem with #425 was the following:
We were parsing the methods after reaching the JS::Value definition.
Those methods contained a JSWhyMagic that we hadn't seen, so we parsed it as
being in the JS:: module.
|
|
|
|
|
|
|
|
We trace all things in the vtable via tracing the base types.
|
|
|
|
|
|
Fixes #410
|
|
|
|
|
|
|
|
|
|
Similar to our ability to emit the clang AST, this adds an option to
emit our IR for debugging purposes.
|
|
- The root crate is the `bindgen` binary
- Rust-ify the test suite, no more subprocesses!
- Update Travis config to test both crates
|
|
|
|
Template alias full and partial specialization improvements.
This doesn't completely fix #251, but fixes other related problems.
r? @fitzgen
|
|
|
|
This adds `debug!` logging for all paths that insert items into
`BindgenContext::items`, and adds some `debug_assert!`s against dangling
`ItemId`s.
|
|
codegen: Always implement debug for __BindgenUnionField.
Our debug-detection code assumes so.
Fixes #246
r? @fitzgen
|
|
Clean up TypeCollector implementations
Rather than making `TypeCollector` implementations recursively call
`collect_types` on their subtypes, just gather immediate subtypes into
the `ItemSet`. The subtypes' `TypeCollector` implementation will be
recursively called by `WhitelistedItemsIter`. This makes it less likely
we will "skip" a layer by recursively calling `collect_types` on
some subtypes without adding the subtypes themselves to the set.
r? @emilio
|
|
When we fail to parse Clang stuff into our IR and give up, and assume
that we are looking at a named template type, we now emit a warning to
assist with debugging.
|
|
Rather than making `TypeCollector` implementations recursively call
`type_collector` on their subtypes, just gather immediate subtypes into
the `ItemSet`. The subtypes' `TypeCollector` implementation will be
recursively called by `WhitelistedItemsIter`. This makes it less likely
we will "skip" a layer by recursively calling `collect_types` on
some subtypes without adding the subtypes themselves to the set.
|
|
Our debug-detection code assumes so.
Fixes #246
r? @fitzgen
|
|
Handle macro redefinition a bit more graciously.
r? @fitzgen
|
|
codegen: Special-case i64::MIN since it produces a overflow on aster.
Proper fix on aster soon, still worth to get this in I guess.
r? @fitzgen
|
|
Fix path detection after #228
r? @fitzgen
Too bad we can't test it on CI because CI has the path correctly setup :(
Fixes #242
|
|
r=emilio
clang::Cursor::referenced should return Option<clang::Cursor>
Fixes https://github.com/servo/rust-bindgen/issues/124
Since I am new to Rust, I hope I didn't do things too badly
|
|
|
|
|
|
Proper fix on aster soon, still worth to get this in I guess.
r? @fitzgen
|
|
r? @fitzgen
Fixes #242
|
|
Add support for bindings to overloaded functions
This commit (re)adds support for generating bindings to overloaded
functions. First, we use the symbol name instead of the canonical name
when checking if we have already generated bindings for a given
function. Second, we add a map from canonical names to number of times
we have generated a function with that canonical name. We increment this
number every time we generate a function. When the number is greater
than zero, we append it to the function name so that overloaded
functions get a unique Rust symbol.
Fixes #239
r? @emilio
|
|
This commit (re)adds support for generating bindings to overloaded
functions. First, we use the symbol name instead of the canonical name
when checking if we have already generated bindings for a given
function. Second, we add a map from canonical names to number of times
we have generated a function with that canonical name. We increment this
number every time we generate a function. When the number is greater
than zero, we append it to the function name so that overloaded
functions get a unique Rust symbol.
|
|
C complex only exists for floating point types.
C Complex are built in types
long double _Complex is not supported.
Long double would be an f128, runing generated binding test produces:
assertion failed: `(left == right)` (left: `16`, right: `32`)',
tests/expectations/tests/complex.rs:72
We test global long double _Complex because it does not require
layout tests.
Handle all the different way a complex can be present in
BindgenContext calling generated_bindegen_complex to indicate
that __BindgenContext will need to be added.
|
|
Add rudimentary support for `__float128`
This adds `__float128` as a builtin type, and generates an opaque array
of 16 `u8`s to represent it in the generated bindings since Rust doesn't
have an `f128` type.
Context and motivation: Somehow `__float128` is getting pulled into
SpiderMonkey headers from somewhere, and the lack of `__float128`
support was causing bindgen to hard fail in bindings generation.
r? @emilio
|
|
This adds `__float128` as a builtin type, and generates an opaque array
of 16 `u8`s to represent it in the generated bindings since Rust doesn't
have an `f128` type.
Context and motivation: Somehow `__float128` is getting pulled into
SpiderMonkey headers from somewhere, and the lack of `__float128`
support was causing bindgen to hard fail in bindings generation.
|
|
Reformat
Automatic reformat running `cargo fmt` for the latest nits introduced.
r? @fitzgen
|
|
|
|
class cursor.
And it's not a valid identifier as a template parameter. See the comment and the
tests for details.
|
|
|
|
|