mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 16:28:24 +02:00
* Merging revisions r43362 from trunk:
------------------------------------------------------------------------ r43362 | michael | 2019-11-02 15:33:19 +0100 (Sat, 02 Nov 2019) | 1 line * Forgot to commit ------------------------------------------------------------------------ git-svn-id: branches/fixes_3_2@43737 -
This commit is contained in:
parent
13a835b99f
commit
29550e5633
@ -155,12 +155,39 @@ var
|
||||
{$ENDIF}
|
||||
|
||||
{$ELSE} (* !LIBXML_THREAD_ALLOC_ENABLED *)
|
||||
{$IFDEF NO_EXTERNAL_VARS}
|
||||
var
|
||||
xmlMalloc: xmlMallocFunc; {$IFNDEF NO_EXTERNAL_VARS}cvar; external;{$ENDIF}
|
||||
xmlMallocAtomic: xmlMallocFunc; {$IFNDEF NO_EXTERNAL_VARS}cvar; external;{$ENDIF}
|
||||
xmlRealloc: xmlReallocFunc; {$IFNDEF NO_EXTERNAL_VARS}cvar; external;{$ENDIF}
|
||||
xmlFree: xmlFreeFunc; {$IFNDEF NO_EXTERNAL_VARS}cvar; external;{$ENDIF}
|
||||
xmlMemStrdup: xmlStrdupFunc; {$IFNDEF NO_EXTERNAL_VARS}cvar; external;{$ENDIF}
|
||||
varxmlMalloc: PxmlMallocFunc;
|
||||
varxmlMallocAtomic: PxmlMallocFunc;
|
||||
varxmlRealloc: PxmlReallocFunc;
|
||||
varxmlFree: PxmlFreeFunc;
|
||||
varxmlMemStrdup: PxmlStrdupFunc;
|
||||
|
||||
function GetxmlMalloc: xmlMallocFunc; inline;
|
||||
procedure SetxmlMalloc(AValue: xmlMallocFunc); inline;
|
||||
function GetxmlMallocAtomic: xmlMallocFunc; inline;
|
||||
procedure SetxmlMallocAtomic(AValue: xmlMallocFunc); inline;
|
||||
function GetxmlRealloc: xmlReallocFunc; inline;
|
||||
procedure SetxmlRealloc(AValue: xmlReallocFunc); inline;
|
||||
function GetxmlFree: xmlFreeFunc; inline;
|
||||
procedure SetxmlFree(AValue: xmlFreeFunc); inline;
|
||||
function GetxmlMemStrdup: xmlStrdupFunc; inline;
|
||||
procedure SetxmlMemStrdup(AValue: xmlStrdupFunc); inline;
|
||||
|
||||
property xmlMalloc: xmlMallocFunc read GetxmlMalloc write SetxmlMalloc;
|
||||
property xmlMallocAtomic: xmlMallocFunc read GetxmlMallocAtomic write SetxmlMallocAtomic;
|
||||
property xmlRealloc: xmlReallocFunc read GetxmlRealloc write SetxmlRealloc;
|
||||
property xmlFree: xmlFreeFunc read GetxmlFree write SetxmlFree;
|
||||
property xmlMemStrdup: xmlStrdupFunc read GetxmlMemStrdup write SetxmlMemStrdup;
|
||||
|
||||
{$ELSE}
|
||||
var
|
||||
xmlMalloc: xmlMallocFunc; cvar; external;
|
||||
xmlMallocAtomic: xmlMallocFunc; cvar; external;
|
||||
xmlRealloc: xmlReallocFunc; cvar; external;
|
||||
xmlFree: xmlFreeFunc; cvar; external;
|
||||
xmlMemStrdup: xmlStrdupFunc; cvar; external;
|
||||
{$ENDIF}
|
||||
{$ENDIF} (* LIBXML_THREAD_ALLOC_ENABLED *)
|
||||
|
||||
{$IFDEF LIBXML_DOCB_ENABLED}
|
||||
|
@ -45,6 +45,9 @@
|
||||
* Signature for a free() implementation.
|
||||
*)
|
||||
xmlFreeFunc = procedure(mem: pointer); EXTDECL;
|
||||
{$IFDEF NO_EXTERNAL_VARS}
|
||||
PxmlFreeFunc = ^xmlFreeFunc;
|
||||
{$ENDIF}
|
||||
|
||||
(**
|
||||
* xmlMallocFunc:
|
||||
@ -55,6 +58,9 @@
|
||||
* Returns a pointer to the newly allocated block or NULL in case of error.
|
||||
*)
|
||||
xmlMallocFunc = function(size: csize_t): pointer; EXTDECL;
|
||||
{$IFDEF NO_EXTERNAL_VARS}
|
||||
PxmlMallocFunc = ^xmlMallocFunc;
|
||||
{$ENDIF}
|
||||
|
||||
(**
|
||||
* xmlReallocFunc:
|
||||
@ -66,6 +72,9 @@
|
||||
* Returns a pointer to the newly reallocated block or NULL in case of error.
|
||||
*)
|
||||
xmlReallocFunc = function(mem: pointer; size: csize_t): pointer; EXTDECL;
|
||||
{$IFDEF NO_EXTERNAL_VARS}
|
||||
PxmlReallocFunc = ^xmlReallocFunc;
|
||||
{$ENDIF}
|
||||
|
||||
(**
|
||||
* xmlStrdupFunc:
|
||||
@ -76,6 +85,9 @@
|
||||
* Returns the copy of the string or NULL in case of error.
|
||||
*)
|
||||
xmlStrdupFunc = function(str: pchar): pchar; EXTDECL;
|
||||
{$IFDEF NO_EXTERNAL_VARS}
|
||||
PxmlStrdupFunc = ^xmlStrdupFunc;
|
||||
{$ENDIF}
|
||||
|
||||
(*
|
||||
* The 4 interfaces used for all memory handling within libxml.
|
||||
@ -170,4 +182,4 @@ function xmlMemStrdupLoc(str: pchar; _file: pchar; line: cint): pchar; EXTDECL;
|
||||
//#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
|
||||
|
||||
{$ENDIF} (* DEBUG_MEMORY_LOCATION *)
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
Loading…
Reference in New Issue
Block a user