File tree 3 files changed +39
-0
lines changed
3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -1295,6 +1295,12 @@ impl MethodCodegen for Method {
1295
1295
_ => panic ! ( "How in the world?" ) ,
1296
1296
} ;
1297
1297
1298
+ // Do not generate variadic methods, since rust does not allow
1299
+ // implementing them, and we don't do a good job at it anyway.
1300
+ if signature. is_variadic ( ) {
1301
+ return ;
1302
+ }
1303
+
1298
1304
let count = {
1299
1305
let mut count = method_names. entry ( name. clone ( ) )
1300
1306
. or_insert ( 0 ) ;
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
+ extern "C" {
8
+ #[ link_name = "_Z3fooPKcz" ]
9
+ pub fn foo ( fmt : * const :: std:: os:: raw:: c_char , ...) ;
10
+ }
11
+ #[ repr( C ) ]
12
+ #[ derive( Debug , Copy ) ]
13
+ pub struct Bar {
14
+ pub _address : u8 ,
15
+ }
16
+ #[ test]
17
+ fn bindgen_test_layout_Bar ( ) {
18
+ assert_eq ! ( :: std:: mem:: size_of:: <Bar >( ) , 1usize ) ;
19
+ assert_eq ! ( :: std:: mem:: align_of:: <Bar >( ) , 1usize ) ;
20
+ }
21
+ extern "C" {
22
+ #[ link_name = "_ZN3Bar3fooEPKcz" ]
23
+ pub fn Bar_foo ( this : * mut Bar , fmt : * const :: std:: os:: raw:: c_char , ...) ;
24
+ }
25
+ impl Clone for Bar {
26
+ fn clone ( & self ) -> Self { * self }
27
+ }
Original file line number Diff line number Diff line change
1
+
2
+ void foo (const char * fmt, ...);
3
+
4
+ struct Bar {
5
+ void foo (const char * fmt, ...);
6
+ };
You can’t perform that action at this time.
0 commit comments