Skip to content

Commit 34e55ac

Browse files
authored
[core] Improve documentation of the char type signed-ness
Fixes #15927 Fixes #7565
1 parent d7f410b commit 34e55ac

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/foundation/inc/RtypesCore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class TRootIOCtor;
4848

4949
//---- types -------------------------------------------------------------------
5050

51-
typedef char Char_t; ///< Signed Character 1 byte (char) \deprecated Consider replacing with `char` or `std::int8_t`
51+
typedef char Char_t; ///< Character 1 byte (char) \warning Can be signed (most common) or unsigned depending on platform and compiler flags. \deprecated Consider replacing with `char`, `signed char` or `std::int8_t`
5252
typedef unsigned char UChar_t; ///< Unsigned Character 1 byte (unsigned char) \deprecated Consider replacing with `unsigned char` or `std::uint8_t`
5353
typedef short Short_t; ///< Signed Short integer 2 bytes (short) \deprecated Consider replacing with `short` or `std::int16_t`
5454
typedef unsigned short UShort_t; ///< Unsigned Short integer 2 bytes (unsigned short) \deprecated Consider replacing with `unsigned short` or `std::uint16_t`

tree/tree/src/TTree.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ It is strongly recommended to persistify those as objects rather than lists of l
9393
assumed of type F by default. The list of currently supported
9494
types is given below:
9595
- `C` : a character string terminated by the 0 character
96-
- `B` : an 8 bit signed integer (`Char_t`); Treated as a character when in an array.
96+
- `B` : an 8 bit integer (`Char_t`); Mostly signed, might be unsigned in special platforms or depending on compiler flags, thus do not use std::int8_t as underlying variable since they are not equivalent; Treated as a character when in an array.
9797
- `b` : an 8 bit unsigned integer (`UChar_t`)
9898
- `S` : a 16 bit signed integer (`Short_t`)
9999
- `s` : a 16 bit unsigned integer (`UShort_t`)
@@ -1971,7 +1971,7 @@ Int_t TTree::Branch(const char* foldername, Int_t bufsize /* = 32000 */, Int_t s
19711971
/// variable. If the first variable does not have a type, it is assumed
19721972
/// of type F by default. The list of currently supported types is given below:
19731973
/// - `C` : a character string terminated by the 0 character
1974-
/// - `B` : an 8 bit signed integer (`Char_t`); Treated as a character when in an array.
1974+
/// - `B` : an 8 bit integer (`Char_t`); Mostly signed, might be unsigned in special platforms or depending on compiler flags, thus do not use std::int8_t as underlying variable since they are not equivalent; Treated as a character when in an array.
19751975
/// - `b` : an 8 bit unsigned integer (`UChar_t`)
19761976
/// - `S` : a 16 bit signed integer (`Short_t`)
19771977
/// - `s` : a 16 bit unsigned integer (`UShort_t`)

0 commit comments

Comments
 (0)