mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 10:19:17 +02:00
* Patch from Inoussa Ouedraogo to make assigning widechar to variant Delphi 2009+ compatible (Bug ID 25719)
git-svn-id: trunk@26873 -
This commit is contained in:
parent
d9df0ff9a8
commit
aac74f4d0a
@ -232,8 +232,11 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
operator :=(const source : widechar) dest : variant;{$ifdef SYSTEMINLINE}inline;{$endif}
|
operator :=(const source : widechar) dest : variant;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||||
|
var
|
||||||
|
ws : WideString;
|
||||||
begin
|
begin
|
||||||
Variantmanager.varfromInt(Dest,word(Source),2);
|
ws:=source;
|
||||||
|
Variantmanager.varfromwstr(Dest,ws);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Strings }
|
{ Strings }
|
||||||
@ -426,8 +429,12 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
operator :=(const source : variant) dest : widechar;{$ifdef SYSTEMINLINE}inline;{$endif}
|
operator :=(const source : variant) dest : widechar;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||||
|
Var
|
||||||
|
S : WideString;
|
||||||
begin
|
begin
|
||||||
dest:=widechar(variantmanager.vartoint(source));
|
VariantManager.vartowstr(S,Source);
|
||||||
|
If Length(S)>0 then
|
||||||
|
Dest:=S[1];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user