Alex, we can provide you with modified versions of the VCL.

Actually, I’m very surprised it passed for you under ENTERPRISE define, because when you enable that you have a scenario like this:


function Seek(Offset: {$IFDef Enterprise} Int64 {$Else} longint {$EndIf}; Origin: TSeekOrigin ): {$IFDef Enterprise} Int64 {$Else} longint {$EndIf}; override;




Where it expects the Seek() function to be declared as a virtual function with Offset as an Int64. Delphi 5 VCL declares that with Offset as an Integer (32 bits) so it should fail for you when compiling with Enterprise conditional compilation enabled and compiling under Delphi without having a modified VCL….


Can you double check that?


Also, I can point you to the modified VCL for you to update yours if you want, but I was interested in making MongoStream.pas “backwards” compatible with prior version of the VCL, without loosing our ENTERPRISE modifications.


So, ideally it should work for you without having to set the ENTERPRISE define….








Sent from Windows Mail





From: Alexey
Sent: ‎Wednesday‎, ‎January‎ ‎15‎, ‎2014 ‎1‎:‎55‎ ‎AM
To: Convey-Compliance/mongo-delphi-driver
Cc: jsbattig





In MongoStream.pas:
> @@ -84,12 +84,8 @@   TMongoStream = class(TStream)
>          = akl128); overload;
>      destructor Destroy; override;
>      function Read(var Buffer; Count: Longint): Longint; override;
> -    {$IFDEF DELPHI2007}
> -    function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; overload; override;
> -    function Seek(Offset: longint; Origin: Word ): longint; override;
> -    {$ELSE}
> -    function Seek(Offset: {$IFDef Enterprise} Int64 {$Else} longint {$EndIf}; Origin: TSeekOrigin ): {$IFDef Enterprise} Int64 {$Else} longint {$EndIf}; override;


I just wanted to use single interface for all delphi versions, so TStream have 2 overload methods(2007 and XE4):
function Seek(Offset: Longint; Origin: Word): Longint; overload; virtual;
function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; overload; virtual;


And for D5 only one:
function Seek(Offset: Longint; Origin: Word): Longint; virtual; abstract;


And I thought we can add 64 bit method as overload.

Anyway I think we have different Delphi 5 environment, cause I got errors you don't have and tests passed for me under Enterprise define. So I can't test my changes properly before push. Could you please clarify about Enterprise and how I can setup my Delphi 5 environment to match yours?

—
Reply to this email directly or view it on GitHub.