mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 03:11:00 +02:00
* Merging revisions r43354 from trunk:
------------------------------------------------------------------------ r43354 | michael | 2019-11-02 11:28:27 +0100 (Sat, 02 Nov 2019) | 1 line * Patch from Michal Gawrycki to handle duplicating strings (bug ID 36243) ------------------------------------------------------------------------ git-svn-id: branches/fixes_3_2@43732 -
This commit is contained in:
parent
00f800b0dd
commit
33e004a0a3
@ -50,6 +50,16 @@ begin
|
||||
ReallocMem(Result, size);
|
||||
end;
|
||||
|
||||
function fpcxmlStrdup(str: pchar): pchar; EXTDECL;
|
||||
var
|
||||
L: SizeInt;
|
||||
begin
|
||||
L := Length(str) + 1;
|
||||
Getmem(Result, L);
|
||||
if Result <> nil then
|
||||
Move(str^, Result^, L);
|
||||
end;
|
||||
|
||||
procedure fpcxmlStructuredErrorHandler(userData: pointer; error: xmlErrorPtr); EXTDECL;
|
||||
begin
|
||||
writeln('struct error');
|
||||
@ -303,7 +313,7 @@ initialization
|
||||
(*
|
||||
* overloading the memory functions
|
||||
*)
|
||||
xmlMemSetup(@fpcxmlFree, @fpcxmlMalloc, @fpcxmlRealloc, nil);
|
||||
xmlMemSetup(@fpcxmlFree, @fpcxmlMalloc, @fpcxmlRealloc, @fpcxmlStrdup);
|
||||
|
||||
(*
|
||||
* overloading the error functions
|
||||
|
Loading…
Reference in New Issue
Block a user