summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-04-18Don't transmute from &Trait to Box<Trait>.Philipp Brüschweiler
This is very unsafe, and not even needed for the current code. Fixes #190
2015-04-13fix: `impl Clone` on generated structs/enumsJorge Aparicio
The `Copy` trait requires that the implementor is also `Clone`. Currently, generated types have a `#[derive(Copy)]` but are missing the `Clone` implementation. With this patch, bindgen now adds a `Clone` implementation to each generated struct/enum. Clone is implemented as a copy because the generated types already have a `#[derive(Copy)]` Sample output: ``` #[repr(C)] #[derive(Copy)] pub struct Struct_termios { pub c_iflag: tcflag_t, pub c_oflag: tcflag_t, pub c_cflag: tcflag_t, pub c_lflag: tcflag_t, pub c_line: cc_t, pub c_cc: [cc_t; 32usize], pub c_ispeed: speed_t, pub c_ospeed: speed_t, } impl ::std::clone::Clone for Struct_termios { fn clone(&self) -> Struct_termios { *self } } impl ::std::default::Default for Struct_termios { fn default() -> Struct_termios { unsafe { ::std::mem::zeroed() } } } ```
2015-04-09fix build on master rustСухарик
2015-03-30upstream rust changes: spit out '1usize' instead of '1u'Jason Fager
2015-03-22Clean up `allow`sTamir Duberstein
2015-03-22Purge `old_io`Tamir Duberstein
2015-03-22Silence warningsTamir Duberstein
2015-03-22RustupTamir Duberstein
Fixes #184.
2015-03-22WhitespaceTamir Duberstein
2015-03-08Fix buildJyun-Yan You
2015-03-06update to rust nightlyJorge Aparicio
2015-03-01fix: update to rust nightlyJorge Aparicio
2015-02-20update Hash impl for upstreamJason Fager
2015-02-19upstream rust changesJason Fager
2015-02-16upstream rust changesJason Fager
2015-02-10Fix buildWill Wykeham
InternedString Deref Feature gate Closure type inference
2015-02-06Use old_pathpanicbit
2015-01-30Update unboxed closure syntax.Nik Voss
2015-01-28Update bindgen bin for io -> old_io too.Robert Clipsham
2015-01-28Fixes for std::io -> std::old_io Rust changes.Robert Clipsham
2015-01-24Fix buildJyun-Yan You
2015-01-21set return code on non-panic errorswartman4404
2015-01-12Use usize/us instead of uint/u in generated codeAndrew Cann
2015-01-10Update for integer renamingDan Burkert
2015-01-10Fix build for rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)Dan Burkert
2015-01-07Gets tests running, simplifies use of Cursor.visit.Christopher Chambers
clang.rs - Remove Box<_> from the signature of Cursor.visit. This makes the implementation a little noisier, but makes calling easier. tests - Updated for recent changes to rustc and std.
2015-01-08Fix unboxed closuresAidan Hobson Sayers
2015-01-07Macro is now a reserved keywordAidan Hobson Sayers
2015-01-05Fixes after entry api modificationsFrancois Bernier
2015-01-03Fix buildEdward Barnard
2015-01-03Don't try to generate assessors for bitfields in anonymous structs. Closes #151.Edward Barnard
2015-01-03Recurse through arrays and pointers to anonymous structs. Closes #150.Edward Barnard
2015-01-03fix build on master rustСухарик
2015-01-01Fix buildEdward Barnard
2015-01-01Structs containing bitfields are now the correct size and bitfield accessors ↵Edward Barnard
can be written by hand if required.
2015-01-01Arrays of type in function arguments now generate pointers to type as per ↵Edward Barnard
the C90 standard. Closes #97.
2014-12-31Adds Default impls for generated composites.Christopher Chambers
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.
2015-01-01Merge branch 'override-enum-type' of https://github.com/dgalling/rust-bindgenJyun-Yan You
2015-01-01Merge branch 'func_proto' of https://github.com/chris-chambers/rust-bindgenJyun-Yan You
Conflicts: src/parser.rs tests/forward_declared_struct.rs tests/test_struct.rs
2014-12-30Add macro option to override enum typeDavis Gallinghouse
2014-12-29Adds support for function prototypes, improves tests.Christopher Chambers
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.
2014-12-29Correctly output builtins. Closes #29.Edward Barnard
2014-12-29Support more composite field types.Edward Barnard
2014-12-29Cleanup.Edward Barnard
2014-12-29Fix a bug in forward declared structs.Edward Barnard
2014-12-28Create names for unnamed bitfield members so rustc can parse the (incorrect) ↵Edward Barnard
definitions.
2014-12-28Switch to using canonical cursors. Closes #139.Edward Barnard
2014-12-27Use by-ref compare instead of by-val compare in visit_composite.Dmitry Kalyanov
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.
2014-12-23Add basic build scriptEdward Barnard
2014-12-23Improve public apiEdward Barnard