@@ -1037,6 +1037,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1037
1037
// Note that no !is_ref types can map to an array because Rust and C's call semantics
1038
1038
// for arrays are different (https://github.com/eqrion/cbindgen/issues/528)
1039
1039
1040
+ "[u8; 33]" if !is_ref => Some ( "crate::c_types::ThirtyThreeBytes" ) ,
1040
1041
"[u8; 32]" if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes" ) ,
1041
1042
"[u8; 20]" if !is_ref => Some ( "crate::c_types::TwentyBytes" ) ,
1042
1043
"[u8; 16]" if !is_ref => Some ( "crate::c_types::SixteenBytes" ) ,
@@ -1145,6 +1146,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1145
1146
"Option" if is_ref => Some ( "&local_" ) ,
1146
1147
"Option" => Some ( "local_" ) ,
1147
1148
1149
+ "[u8; 33]" if !is_ref => Some ( "" ) ,
1148
1150
"[u8; 32]" if is_ref => Some ( "unsafe { &*" ) ,
1149
1151
"[u8; 32]" if !is_ref => Some ( "" ) ,
1150
1152
"[u8; 20]" if !is_ref => Some ( "" ) ,
@@ -1259,6 +1261,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1259
1261
"Option" => Some ( "" ) ,
1260
1262
"Result" if !is_ref => Some ( "" ) ,
1261
1263
1264
+ "[u8; 33]" if !is_ref => Some ( ".data" ) ,
1262
1265
"[u8; 32]" if is_ref => Some ( "}" ) ,
1263
1266
"[u8; 32]" if !is_ref => Some ( ".data" ) ,
1264
1267
"[u8; 20]" if !is_ref => Some ( ".data" ) ,
@@ -1373,6 +1376,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1373
1376
"Vec" if !is_ref => Some ( "local_" ) ,
1374
1377
"Option" => Some ( "local_" ) ,
1375
1378
1379
+ "[u8; 33]" if is_ref => Some ( "" ) ,
1376
1380
"[u8; 32]" if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes { data: " ) ,
1377
1381
"[u8; 32]" if is_ref => Some ( "" ) ,
1378
1382
"[u8; 20]" if !is_ref => Some ( "crate::c_types::TwentyBytes { data: " ) ,
@@ -1477,6 +1481,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1477
1481
"Vec" if !is_ref => Some ( ".into()" ) ,
1478
1482
"Option" => Some ( "" ) ,
1479
1483
1484
+ "[u8; 33]" if is_ref => Some ( "" ) ,
1480
1485
"[u8; 32]" if !is_ref => Some ( " }" ) ,
1481
1486
"[u8; 32]" if is_ref => Some ( "" ) ,
1482
1487
"[u8; 20]" if !is_ref => Some ( " }" ) ,
0 commit comments