mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 16:59:20 +02:00
LCL: added unicode streaming, fixes compilation with fpc 2.3.1, from Anton Kavalenka (issue #12258)
git-svn-id: trunk@16814 -
This commit is contained in:
parent
af8229264b
commit
a60139801c
@ -148,6 +148,9 @@ type
|
|||||||
function ReadStr: String; override;
|
function ReadStr: String; override;
|
||||||
function ReadString(StringType: TValueType): String; override;
|
function ReadString(StringType: TValueType): String; override;
|
||||||
function ReadWideString: WideString; override;
|
function ReadWideString: WideString; override;
|
||||||
|
{$ifndef VER2_2}
|
||||||
|
function ReadUnicodeString: UnicodeString; override;
|
||||||
|
{$endif}
|
||||||
procedure SkipComponent(SkipComponentInfos: Boolean); override;
|
procedure SkipComponent(SkipComponentInfos: Boolean); override;
|
||||||
procedure SkipValue; override;
|
procedure SkipValue; override;
|
||||||
public
|
public
|
||||||
@ -210,6 +213,9 @@ type
|
|||||||
procedure WriteSet(Value: LongInt; SetType: Pointer); override;
|
procedure WriteSet(Value: LongInt; SetType: Pointer); override;
|
||||||
procedure WriteString(const Value: String); override;
|
procedure WriteString(const Value: String); override;
|
||||||
procedure WriteWideString(const Value: WideString); override;
|
procedure WriteWideString(const Value: WideString); override;
|
||||||
|
{$ifndef VER2_2}
|
||||||
|
procedure WriteUnicodeString(const Value: UnicodeString); override;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
property InstanceStack: TStringList read FInstanceStack write FInstanceStack;// list of TPersistent
|
property InstanceStack: TStringList read FInstanceStack write FInstanceStack;// list of TPersistent
|
||||||
end;
|
end;
|
||||||
@ -3840,6 +3846,19 @@ begin
|
|||||||
//debugln('TLRSObjectReader.ReadWideString ',Result);
|
//debugln('TLRSObjectReader.ReadWideString ',Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$ifndef VER2_2}
|
||||||
|
function TLRSObjectReader.ReadUnicodeString: UnicodeString;
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
i:=ReadIntegerContent;
|
||||||
|
SetLength(Result, i);
|
||||||
|
if i > 0 then
|
||||||
|
Read(Pointer(@Result[1])^, i*2);
|
||||||
|
//debugln('TLRSObjectReader.ReadWideString ',Result);
|
||||||
|
end;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
procedure TLRSObjectReader.SkipComponent(SkipComponentInfos: Boolean);
|
procedure TLRSObjectReader.SkipComponent(SkipComponentInfos: Boolean);
|
||||||
var
|
var
|
||||||
Flags: TFilerFlags;
|
Flags: TFilerFlags;
|
||||||
@ -4367,6 +4386,17 @@ begin
|
|||||||
WriteWideStringContent(Value);
|
WriteWideStringContent(Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$ifndef VER2_2}
|
||||||
|
procedure TLRSObjectWriter.WriteUnicodeString(const Value: UnicodeString);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
WriteValue(vaUString);
|
||||||
|
i := Length(Value);
|
||||||
|
WriteIntegerContent(i);
|
||||||
|
WriteWideStringContent(Value);
|
||||||
|
end;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
{ TLRPositionLinks }
|
{ TLRPositionLinks }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user