File tree 6 files changed +67
-2
lines changed
6 files changed +67
-2
lines changed Original file line number Diff line number Diff line change @@ -1404,7 +1404,7 @@ impl MethodCodegen for Method {
1404
1404
1405
1405
let item = ast:: ImplItem {
1406
1406
id : ast:: DUMMY_NODE_ID ,
1407
- ident : ctx. ext_cx ( ) . ident_of ( & name) ,
1407
+ ident : ctx. rust_ident ( & name) ,
1408
1408
vis : ast:: Visibility :: Public ,
1409
1409
attrs : attrs,
1410
1410
node : ast:: ImplItemKind :: Method ( sig, P ( block) ) ,
Original file line number Diff line number Diff line change @@ -242,9 +242,9 @@ impl ClangSubItemParser for Function {
242
242
-> Result < ParseResult < Self > , ParseError > {
243
243
use clang_sys:: * ;
244
244
match cursor. kind ( ) {
245
+ // FIXME(emilio): Generate destructors properly.
245
246
CXCursor_FunctionDecl |
246
247
CXCursor_Constructor |
247
- CXCursor_Destructor |
248
248
CXCursor_CXXMethod => { }
249
249
_ => return Err ( ParseError :: Continue ) ,
250
250
} ;
Original file line number Diff line number Diff line change
1
+ /* automatically generated by rust-bindgen */
2
+
3
+
4
+ #![ allow( non_snake_case) ]
5
+
6
+
7
+ #[ repr( C ) ]
8
+ #[ derive( Debug , Copy ) ]
9
+ pub struct Foo {
10
+ pub _address : u8 ,
11
+ }
12
+ #[ test]
13
+ fn bindgen_test_layout_Foo ( ) {
14
+ assert_eq ! ( :: std:: mem:: size_of:: <Foo >( ) , 1usize ) ;
15
+ assert_eq ! ( :: std:: mem:: align_of:: <Foo >( ) , 1usize ) ;
16
+ }
17
+ extern "C" {
18
+ #[ link_name = "_ZN3Foo4typeEv" ]
19
+ pub fn Foo_type ( this : * mut Foo ) -> :: std:: os:: raw:: c_int ;
20
+ }
21
+ impl Clone for Foo {
22
+ fn clone ( & self ) -> Self { * self }
23
+ }
24
+ impl Foo {
25
+ #[ inline]
26
+ pub unsafe fn type_ ( & mut self ) -> :: std:: os:: raw:: c_int {
27
+ Foo_type ( & mut * self )
28
+ }
29
+ }
Original file line number Diff line number Diff line change
1
+ /* automatically generated by rust-bindgen */
2
+
3
+
4
+ #![ allow( non_snake_case) ]
5
+
6
+
7
+ #[ repr( C ) ]
8
+ #[ derive( Debug ) ]
9
+ pub struct cv_String {
10
+ pub _address : u8 ,
11
+ }
12
+ #[ test]
13
+ fn bindgen_test_layout_cv_String ( ) {
14
+ assert_eq ! ( :: std:: mem:: size_of:: <cv_String>( ) , 1usize ) ;
15
+ assert_eq ! ( :: std:: mem:: align_of:: <cv_String>( ) , 1usize ) ;
16
+ }
Original file line number Diff line number Diff line change
1
+
2
+ class Foo {
3
+ public:
4
+ int type ();
5
+ };
Original file line number Diff line number Diff line change
1
+
2
+
3
+ namespace cv {
4
+ class String {
5
+ public:
6
+ ~String ();
7
+ };
8
+
9
+
10
+ inline
11
+ String::~String ()
12
+ {
13
+ }
14
+
15
+ }
You can’t perform that action at this time.
0 commit comments