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 @@ -1319,6 +1319,12 @@ impl MethodCodegen for Method {
1319
1319
_ => panic ! ( "How in the world?" ) ,
1320
1320
} ;
1321
1321
1322
+ // Do not generate variadic methods, since rust does not allow
1323
+ // implementing them, and we don't do a good job at it anyway.
1324
+ if signature. is_variadic ( ) {
1325
+ return ;
1326
+ }
1327
+
1322
1328
let count = {
1323
1329
let mut count = method_names. entry ( name. clone ( ) )
1324
1330
. 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