Paul Ishenin wrote:

I help to convert Fib+ library to FPC/Lazarus and this was one of the problems we found.

Found one more incompatibility - TField.SetAsVariant declaration is differ:

delphi:
procedure SetAsVariant(const AValue: variant); virtual;

fpc:
procedure SetAsVariant(AValue: variant); virtual;

Can 'const' can be added to the fpc declaration?

Patch that fixed both incompatibilities is attached.

And, btw: GetDataSize and SetSize have word argument in fpc while in delphi they are integer. I think this incompatibility will not be fixed - so I will live with it.

Thanks.

Best regards,
Paul Ishenin.
Index: packages/fcl-db/src/base/db.pas
===================================================================
--- packages/fcl-db/src/base/db.pas     (revision 11115)
+++ packages/fcl-db/src/base/db.pas     (working copy)
@@ -299,7 +299,6 @@
     Function GetIndex : longint;
     procedure SetAlignment(const AValue: TAlignMent);
     procedure SetIndex(const AValue: Integer);
-    Procedure SetDataset(AValue : TDataset);
     function GetDisplayText: String;
     function GetEditText: String;
     procedure SetEditText(const AValue: string);
@@ -350,9 +349,10 @@
     procedure SetAsLongint(AValue: Longint); virtual;
     procedure SetAsInteger(AValue: Integer); virtual;
     procedure SetAsLargeint(AValue: Largeint); virtual;
-    procedure SetAsVariant(AValue: variant); virtual;
+    procedure SetAsVariant(const AValue: variant); virtual;
     procedure SetAsString(const AValue: string); virtual;
     procedure SetAsWideString(const aValue: WideString); virtual;
+    procedure SetDataset(AValue : TDataset); virtual;
     procedure SetDataType(AValue: TFieldType);
     procedure SetNewValue(const AValue: Variant);
     procedure SetSize(AValue: Word); virtual;
Index: packages/fcl-db/src/base/fields.inc
===================================================================
--- packages/fcl-db/src/base/fields.inc (revision 11115)
+++ packages/fcl-db/src/base/fields.inc (working copy)
@@ -742,7 +742,7 @@
   Raise AccessError(SFloat);
 end;
 
-procedure TField.SetAsVariant(AValue: Variant);
+procedure TField.SetAsVariant(const AValue: Variant);
 
 begin
   if VarIsNull(AValue) then
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to