Age | Commit message (Collapse) | Author |
|
the C90 standard. Closes #97.
|
|
gen.rs
- Structs and unions now emit an implementation of the Default trait
using std::mem::zeroed to create a zeroed instance.
tests/support.rs
- AST comparisons are now done on the pretty-printed version of the
ASTs. Differences in AttrIds and some identifiers (generated with
gensym to ensure uniqueness) made it unreliable to compare the ASTs
directly. This way should work, even if it doesn't score many points
for style.
tests/*
- Updated to use Default::default() where appropriate.
- Eliminated a few warnings.
|
|
|
|
Conflicts:
src/parser.rs
tests/forward_declared_struct.rs
tests/test_struct.rs
|
|
|
|
Fixes #79. Fixes #100.
Cargo.toml
- Adds `[[test]]` section pointing to tests.rs, where all former tests are
now imported as modules (cf Servo's tests).
gen.rs
- Breaks up `TFunc` handling into `TFuncPtr` and `TFuncProto`.
- Eliminates empty `extern "C" { }` block that was sometimes generated.
lib.rs
- Eliminates `dead_code` warnings and one about `LinkType` being able to
implement `Copy`.
parser.rs
- Breaks up function handling into `TFuncPtr` and `TFuncProto`.
- Uses the `FuncSig` type to capture information about function
signatures.
- Adds support for pointers to arrays at the global scope.
types.rs
- Adds types related to function prototype and pointer handling:
`FuncSig`, `TFuncPtr` and `TFuncProto`.
tests
- Adds quote-based testing. Using the `assert_bind_eq!` macro, it is
now possible--without too much ceremony--to test bindgen output of an
input file against inline source created with the `quote_item!` (and
other `quote_*` macros).
- Removes stringify-based testing.
- Combines test running into a single entry point, `test.rs`.
- Shortens test names where possible without losing context.
|
|
|
|
|
|
|
|
|
|
definitions.
|
|
|
|
When comparing type that has a pointer to itself, `==' may go into infinite recursion.
Comparing by reference avoids this. Since `c' and `ty_compinfo` are Rc<RefCell<..>>,
compare references to interior of RefCell.
|
|
|
|
|
|
|
|
parser.rs
- Adds detection of nested composite fields so that they can be handled
specially during generation (see visit_composite).
- Changes to manual recursion through Clang's cursors so that top-level
and nested composites can be handled separately.
gen.rs
- Improves generation for nested composite types.
- Unifies handling of structs and unions somewhat.
types.rs
- Adds CompKind to distinguish between structs and unions.
- Updates CompInfo to use CompKind rather than a bool.
|
|
Previously, all function pointer types always had their arguments bound
as arg1, arg2, etc. This change preserves the argument names, when they
are available.
parser.rs
- Uses the type cursor to visit children and gather argument names and
types.
tests/func_ptr.rs
- Binds tests/headers/func_ptr.h and tests/headers/func_ptr_in_struct.h
and ensures that argument names are correctly bound.
|
|
macro.rs
- Removes make_string_vec in favor of the vec! macro.
- Updates test_parse_process_args with vec!.
cmath.rs
- Adds needed 'extern crate libc;' declaration.
- bindgen! invocation now references math.h as "/usr/include/math.h",
which should be pretty universal. Clang was not able to find the file
using just "math.h".
- Moves contents of main method into a #[test] method.
|
|
This fixes a bug where empty C structs would be outputted as
struct Struct_Foo {
}
instead of
struct Struct_Foo;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
With this patch, rust-bindgen generates extern functions with
calling conventions specified in header.
This patch also removes `-abi` flag.
|
|
|
|
Fixes breakage caused by rust-lang/rust#18229 and rust-lang/rust#18365
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|