@@ -1090,38 +1090,10 @@ impl<'ctx> BindgenContext<'ctx> {
1090
1090
CXType_Bool => TypeKind :: Int ( IntKind :: Bool ) ,
1091
1091
CXType_Int => TypeKind :: Int ( IntKind :: Int ) ,
1092
1092
CXType_UInt => TypeKind :: Int ( IntKind :: UInt ) ,
1093
- CXType_SChar | CXType_Char_S |
1094
- CXType_UChar | CXType_Char_U => {
1095
- let spelling = ty. spelling ( ) ;
1096
-
1097
- debug_assert ! ( spelling. contains( "char" ) ,
1098
- "This is the canonical type, so no aliases or \
1099
- typedefs!") ;
1100
-
1101
- let signed = match ty. kind ( ) {
1102
- CXType_SChar | CXType_Char_S => true ,
1103
- _ => false ,
1104
- } ;
1105
-
1106
- // Clang only gives us the signedness of the target platform.
1107
- //
1108
- // Match the spelling for common cases we can handle
1109
- // cross-platform.
1110
- match & * spelling {
1111
- "char" | "const char" => {
1112
- TypeKind :: Int ( IntKind :: Char {
1113
- is_signed : signed,
1114
- } )
1115
- } ,
1116
- _ => {
1117
- if signed {
1118
- TypeKind :: Int ( IntKind :: SChar )
1119
- } else {
1120
- TypeKind :: Int ( IntKind :: UChar )
1121
- }
1122
- } ,
1123
- }
1124
- }
1093
+ CXType_Char_S => TypeKind :: Int ( IntKind :: Char { is_signed : true } ) ,
1094
+ CXType_Char_U => TypeKind :: Int ( IntKind :: Char { is_signed : false } ) ,
1095
+ CXType_SChar => TypeKind :: Int ( IntKind :: SChar ) ,
1096
+ CXType_UChar => TypeKind :: Int ( IntKind :: UChar ) ,
1125
1097
CXType_Short => TypeKind :: Int ( IntKind :: Short ) ,
1126
1098
CXType_UShort => TypeKind :: Int ( IntKind :: UShort ) ,
1127
1099
CXType_WChar | CXType_Char16 => TypeKind :: Int ( IntKind :: U16 ) ,
0 commit comments