mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-30 09:39:48 +02:00
* delphi zlib unit fixes
git-svn-id: trunk@1034 -
This commit is contained in:
parent
9a3658e010
commit
aa4aa540f6
@ -54,6 +54,7 @@ type
|
|||||||
adler : uLong;
|
adler : uLong;
|
||||||
reserved : uLong;
|
reserved : uLong;
|
||||||
end;
|
end;
|
||||||
|
TZStreamRec = TZStream;
|
||||||
PZstream = ^TZStream;
|
PZstream = ^TZStream;
|
||||||
gzFile = pointer;
|
gzFile = pointer;
|
||||||
|
|
||||||
@ -141,6 +142,8 @@ function zError(err:longint):string;
|
|||||||
function inflateSyncPoint(z:PZstream):longint;cdecl;external libz name 'inflateSyncPoint';
|
function inflateSyncPoint(z:PZstream):longint;cdecl;external libz name 'inflateSyncPoint';
|
||||||
function get_crc_table:pointer;cdecl;external libz name 'get_crc_table';
|
function get_crc_table:pointer;cdecl;external libz name 'get_crc_table';
|
||||||
|
|
||||||
|
function zlibAllocMem(AppData: Pointer; Items, Size: Integer): Pointer; cdecl;
|
||||||
|
procedure zlibFreeMem(AppData, Block: Pointer); cdecl;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -177,4 +180,17 @@ function zError(err:longint):string;
|
|||||||
zerror:=Strpas(zErrorpchar(err));
|
zerror:=Strpas(zErrorpchar(err));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function zlibAllocMem(AppData: Pointer; Items, Size: Integer): Pointer; cdecl;
|
||||||
|
|
||||||
|
begin
|
||||||
|
Result := AllocMem(Items * Size);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure zlibFreeMem(AppData, Block: Pointer); cdecl;
|
||||||
|
|
||||||
|
begin
|
||||||
|
FreeMem(Block);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user