Talk:System.TypInfo.TSymbolName
NOTE: On Mobile TSymbolName is not a ShortString. Here are the Mobile declarations:
C++ | Delphi |
---|---|
typedef System::Byte TSymbolName;
|
TSymbolName = Byte;
|
This can cause subtle failures that are hard to assess, such as:
void test(System::Typinfo::PTypInfop ti) {
printf("Type name = '%s'\n", System::AnsiString(ti->Name).c_str());
}
The above will work as expected on Desktop but fail strangely on Mobile as the AnsiString is built off a Byte, instead of a ShortString :(
The same issue applies to various <type>.Name fields from the System.TypInfo unit.