In Winapi.Windows.pas
of Delphi XE3, many C types that were formerly defined as PWideChar
and PAnsiChar
now are defined as MarshaledString
and MarshaledAString
respectively (e.g. PWChar
, LPSTR
):
PWChar = MarshaledString;
LPSTR = MarshaledAString;
Indeed, in System.pas
, MarshaledString
and MarshaledAString
are equivalent to PWideChar
and PAnsiChar
respectively,
MarshaledString = PWideChar;
MarshaledAString = PAnsiChar;
but what is the background behind this decision? I mean, why Embarcadero should redefine such C string types?