Browse Source

+ partial fix for Mantis #36358: apply partial patch by Imants Gulbis to add assignment operator for TValue from Comp and IUnknown

git-svn-id: trunk@43777 -
svenbarth 5 years ago
parent
commit
8ff14ed5d1
1 changed files with 11 additions and 0 deletions
  1. 11 0
      packages/rtl-objpas/src/inc/rtti.pp

+ 11 - 0
packages/rtl-objpas/src/inc/rtti.pp

@@ -159,11 +159,13 @@ type
     class operator := (AValue: Extended): TValue; inline;
     class operator := (AValue: Extended): TValue; inline;
 {$endif}
 {$endif}
     class operator := (AValue: Currency): TValue; inline;
     class operator := (AValue: Currency): TValue; inline;
+    class operator := (AValue: Comp): TValue; inline;
     class operator := (AValue: Int64): TValue; inline;
     class operator := (AValue: Int64): TValue; inline;
     class operator := (AValue: QWord): TValue; inline;
     class operator := (AValue: QWord): TValue; inline;
     class operator := (AValue: TObject): TValue; inline;
     class operator := (AValue: TObject): TValue; inline;
     class operator := (AValue: TClass): TValue; inline;
     class operator := (AValue: TClass): TValue; inline;
     class operator := (AValue: Boolean): TValue; inline;
     class operator := (AValue: Boolean): TValue; inline;
+    class operator := (AValue: IUnknown): TValue; inline;
     property DataSize: SizeInt read GetDataSize;
     property DataSize: SizeInt read GetDataSize;
     property Kind: TTypeKind read GetTypeKind;
     property Kind: TTypeKind read GetTypeKind;
     property TypeData: PTypeData read GetTypeDataProp;
     property TypeData: PTypeData read GetTypeDataProp;
@@ -2259,6 +2261,11 @@ begin
   Make(@AValue, System.TypeInfo(AValue), Result);
   Make(@AValue, System.TypeInfo(AValue), Result);
 end;
 end;
 
 
+class operator TValue.:=(AValue: Comp): TValue;
+begin
+  Make(@AValue, System.TypeInfo(AValue), Result);
+end;
+
 class operator TValue.:=(AValue: Int64): TValue;
 class operator TValue.:=(AValue: Int64): TValue;
 begin
 begin
   Make(@AValue, System.TypeInfo(AValue), Result);
   Make(@AValue, System.TypeInfo(AValue), Result);
@@ -2284,6 +2291,10 @@ begin
   Make(@AValue, System.TypeInfo(AValue), Result);
   Make(@AValue, System.TypeInfo(AValue), Result);
 end;
 end;
 
 
+class operator TValue.:=(AValue: IUnknown): TValue;
+begin
+  Make(@AValue, System.TypeInfo(AValue), Result);
+end;
 
 
 function Invoke(aCodeAddress: CodePointer; const aArgs: TValueArray;
 function Invoke(aCodeAddress: CodePointer; const aArgs: TValueArray;
   aCallConv: TCallConv; aResultType: PTypeInfo; aIsStatic: Boolean;
   aCallConv: TCallConv; aResultType: PTypeInfo; aIsStatic: Boolean;