File tree 3 files changed +8
-5
lines changed
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ pub(crate) mod ast_ty {
204
204
// argument is used. bindgen_cchar16_t is not a real type;
205
205
// but this allows downstream postprocessors to distinguish
206
206
// this case and do something special for C++ bindings
207
- // containing char16_t.
207
+ // containing the C++ type char16_t.
208
208
IntKind :: Char16 => syn:: parse_quote! { bindgen_cchar16_t } ,
209
209
IntKind :: SChar => raw_type ( ctx, "c_schar" ) ,
210
210
IntKind :: UChar => raw_type ( ctx, "c_uchar" ) ,
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ pub enum IntKind {
57
57
/// A 16-bit integer, used only for enum size representation.
58
58
U16 ,
59
59
60
- /// Either a `char16_t` or a `wchar_t` .
60
+ /// The C++ type `char16_t`, which is its own type (unlike in C) .
61
61
Char16 ,
62
62
63
63
/// A 32-bit signed integer.
Original file line number Diff line number Diff line change @@ -254,10 +254,13 @@ options! {
254
254
as_args: "--use-unused-template-param-newtype-wrapper" ,
255
255
} ,
256
256
257
- /// Whether we should distinguish between 'char16_t' and 'u16'.
258
- /// As standard, bindgen represents `char16_t` as `u16`.
257
+ /// Whether we should distinguish between C++'s 'char16_t' and 'u16'.
258
+ /// The C++ type `char16_t` is its own special type; it's not a typedef
259
+ /// of some other integer (this differs from C).
260
+ /// As standard, bindgen represents C++ `char16_t` as `u16`.
259
261
/// Rust does not have a `std::os::raw::c_char16_t` type, and thus
260
- /// we can't use a built-in Rust type in the generated bindings.
262
+ /// we can't use a built-in Rust type in the generated bindings (and
263
+ /// nor would it be appropriate as it's a C++-specific type.)
261
264
/// But for some uses of bindgen, especially when downstream
262
265
/// post-processing occurs, it's important to distinguish `char16_t`
263
266
/// from normal `uint16_t`. When this option is enabled, bindgen
You can’t perform that action at this time.
0 commit comments