[
https://issues.apache.org/jira/browse/THRIFT-4461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Anton Shchyrov updated THRIFT-4461:
-----------------------------------
Description:
In module Thrift.Utils daclared two methods
{code:java}
class function CharUtils.IsHighSurrogate( const c : Char) : Boolean;
begin
{$IF CompilerVersion < 23.0}
result := Character.IsHighSurrogate( c);
{$ELSE}
result := c.IsHighSurrogate();
{$IFEND}
end;
class function CharUtils.IsLowSurrogate( const c : Char) : Boolean;
begin
{$IF CompilerVersion < 23.0}
result := Character.IsLowSurrogate( c);
{$ELSE}
result := c.IsLowSurrogate;
{$IFEND}
end;
{code}
But methods Char.IsHighSurrogate()/Char.IsLowSurrogate() **appeared in Delphi
XE4. For Delphi XE4 variable CompilerVersion equal 25.
In this way condition
{{{$IF CompilerVersion < 23.0}}}
may be changed to
{{{$IF CompilerVersion < *25.0*}}}
And access for unit *Character* may be determined through defiine symbol
*OLD_UNIT_NAMES*
was:
In module Thrift.Utils daclared two methods
{{class function CharUtils.IsHighSurrogate( const c : Char) : Boolean;}}
{{begin}}
{{ \{$IF CompilerVersion < 23.0}}}
{{ result := Character.IsHighSurrogate( c);}}
{{ \{$ELSE}}}
{{ result := c.IsHighSurrogate();}}
{{ \{$IFEND}}}
{{end;}}
{{class function CharUtils.IsLowSurrogate( const c : Char) : Boolean;}}
{{begin}}
{{ \{$IF CompilerVersion < 23.0}}}
{{ result := Character.IsLowSurrogate( c);}}
{{ \{$ELSE}}}
{{ result := c.IsLowSurrogate;}}
{{ \{$IFEND}}}
{{end;}}
But methods Char.IsHighSurrogate()/Char.IsLowSurrogate() **appeared in Delphi
XE4. For Delphi XE4 variable CompilerVersion equal 25.
In this way condition
{{{$IF CompilerVersion < 23.0}}}
may be changed to
{{{$IF CompilerVersion < *25.0*}}}
And access for unit *Character* may be determined through defiine symbol
*OLD_UNIT_NAMES*
> Compiler directive should match Delphi XE4
> ------------------------------------------
>
> Key: THRIFT-4461
> URL: https://issues.apache.org/jira/browse/THRIFT-4461
> Project: Thrift
> Issue Type: Bug
> Components: Delphi - Library
> Affects Versions: 0.11.0
> Environment: Delphi XE3
> Reporter: Anton Shchyrov
> Assignee: Jens Geyer
> Priority: Minor
> Labels: delphi
> Fix For: 0.12.0
>
> Attachments: Thrift.Utils.diff
>
>
> In module Thrift.Utils daclared two methods
>
> {code:java}
> class function CharUtils.IsHighSurrogate( const c : Char) : Boolean;
> begin
> {$IF CompilerVersion < 23.0}
> result := Character.IsHighSurrogate( c);
> {$ELSE}
> result := c.IsHighSurrogate();
> {$IFEND}
> end;
> class function CharUtils.IsLowSurrogate( const c : Char) : Boolean;
> begin
> {$IF CompilerVersion < 23.0}
> result := Character.IsLowSurrogate( c);
> {$ELSE}
> result := c.IsLowSurrogate;
> {$IFEND}
> end;
> {code}
> But methods Char.IsHighSurrogate()/Char.IsLowSurrogate() **appeared in Delphi
> XE4. For Delphi XE4 variable CompilerVersion equal 25.
> In this way condition
> {{{$IF CompilerVersion < 23.0}}}
> may be changed to
> {{{$IF CompilerVersion < *25.0*}}}
> And access for unit *Character* may be determined through defiine symbol
> *OLD_UNIT_NAMES*
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)