Skip to content

Commit de707f9

Browse files
committed
synopse#458: another fix for PasZip
1 parent 4fe8e8d commit de707f9

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

PasZip.pas

+10-2
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ function UpdateCrc32(aCRC32: cardinal; inBuf: pointer; inLen: integer): cardinal
179179
{$ifdef MSWINDOWS}
180180

181181
type
182+
{$ifdef ISDELPHI2010}
183+
// The return type for FileCreate since Delphi 2010 has changed
184+
// from an Integer type to THandle
185+
TFileHandle = THandle;
186+
{$else}
187+
TFileHandle = integer;
188+
{$endif ISDELPHI2010}
189+
182190
/// generic file information structure, as used in .zip file format
183191
// - used in any header, contains info about following block
184192
TFileInfo = packed record
@@ -246,7 +254,7 @@ function UpdateCrc32(aCRC32: cardinal; inBuf: pointer; inLen: integer): cardinal
246254
// - can open a .zip archive file content from memory
247255
TZipRead = class
248256
private
249-
file_, map: dword; // we use a memory mapped file to access the zip content
257+
file_, map: THandle; // we use a memory mapped file to access the zip content
250258
buf: PByteArray;
251259
fZipStartOffset: cardinal;
252260
fShowMessageBoxOnError: boolean;
@@ -295,7 +303,7 @@ TZipWrite = class
295303
fMagic: cardinal;
296304
public
297305
/// the associated file handle
298-
Handle: integer;
306+
Handle: TFileHandle;
299307
/// the total number of entries
300308
Count: integer;
301309
/// the resulting file entries

SynopseCommit.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
'1.18.7658'
1+
'1.18.7659'

0 commit comments

Comments
 (0)