mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-29 22:19:21 +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;
|
||||
reserved : uLong;
|
||||
end;
|
||||
TZStreamRec = TZStream;
|
||||
PZstream = ^TZStream;
|
||||
gzFile = pointer;
|
||||
|
||||
@ -141,6 +142,8 @@ function zError(err:longint):string;
|
||||
function inflateSyncPoint(z:PZstream):longint;cdecl;external libz name 'inflateSyncPoint';
|
||||
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
|
||||
|
||||
@ -177,4 +180,17 @@ function zError(err:longint):string;
|
||||
zerror:=Strpas(zErrorpchar(err));
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user