mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
Heiko W. Rupp fixed a lot of comments to generate better API descriptions
* include/libxml/*.h: Heiko W. Rupp fixed a lot of comments to generate better API descriptions etc... Daniel
This commit is contained in:
@@ -18,10 +18,10 @@
|
||||
/**
|
||||
* DEBUG_MEMORY:
|
||||
*
|
||||
* should be activated only done when debugging libxml. It replaces the
|
||||
* allocator with a collect and debug shell to the libc allocator.
|
||||
* DEBUG_MEMORY should be activated only when debugging
|
||||
* libxml i.e. if libxml has been configured with --with-debug-mem too
|
||||
* DEBUG_MEMORY replaces the allocator with a collect and debug
|
||||
* shell to the libc allocator.
|
||||
* DEBUG_MEMORY should only be activated when debugging
|
||||
* libxml i.e. if libxml has been configured with --with-debug-mem too.
|
||||
*/
|
||||
/* #define DEBUG_MEMORY_FREED */
|
||||
/* #define DEBUG_MEMORY_LOCATION */
|
||||
@@ -36,7 +36,7 @@
|
||||
* DEBUG_MEMORY_LOCATION:
|
||||
*
|
||||
* DEBUG_MEMORY_LOCATION should be activated only when debugging
|
||||
* libxml i.e. if libxml has been configured with --with-debug-mem too
|
||||
* libxml i.e. if libxml has been configured with --with-debug-mem too.
|
||||
*/
|
||||
#ifdef DEBUG_MEMORY_LOCATION
|
||||
#endif
|
||||
@@ -46,22 +46,22 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The XML memory wrapper support 4 basic overloadable functions
|
||||
* The XML memory wrapper support 4 basic overloadable functions.
|
||||
*/
|
||||
/**
|
||||
* xmlFreeFunc:
|
||||
* @mem: an already allocated block of memory
|
||||
*
|
||||
* Signature for a free() implementation
|
||||
* Signature for a free() implementation.
|
||||
*/
|
||||
typedef void (*xmlFreeFunc)(void *mem);
|
||||
/**
|
||||
* xmlMallocFunc:
|
||||
* @size: the size requested in bytes
|
||||
*
|
||||
* Signature for a malloc() implementation
|
||||
* Signature for a malloc() implementation.
|
||||
*
|
||||
* Returns a pointer to the newly allocated block or NULL in case of error
|
||||
* Returns a pointer to the newly allocated block or NULL in case of error.
|
||||
*/
|
||||
typedef void *(*xmlMallocFunc)(size_t size);
|
||||
|
||||
@@ -70,9 +70,9 @@ typedef void *(*xmlMallocFunc)(size_t size);
|
||||
* @mem: an already allocated block of memory
|
||||
* @size: the new size requested in bytes
|
||||
*
|
||||
* Signature for a realloc() implementation
|
||||
* Signature for a realloc() implementation.
|
||||
*
|
||||
* Returns a pointer to the newly reallocated block or NULL in case of error
|
||||
* Returns a pointer to the newly reallocated block or NULL in case of error.
|
||||
*/
|
||||
typedef void *(*xmlReallocFunc)(void *mem, size_t size);
|
||||
|
||||
@@ -80,14 +80,14 @@ typedef void *(*xmlReallocFunc)(void *mem, size_t size);
|
||||
* xmlStrdupFunc:
|
||||
* @str: a zero terminated string
|
||||
*
|
||||
* Signature for an strdup() implementation
|
||||
* Signature for an strdup() implementation.
|
||||
*
|
||||
* Returns the copy of the string or NULL in case of error
|
||||
* Returns the copy of the string or NULL in case of error.
|
||||
*/
|
||||
typedef char *(*xmlStrdupFunc)(const char *str);
|
||||
|
||||
/*
|
||||
* The 4 interfaces used for all memory handling within libxml
|
||||
* The 4 interfaces used for all memory handling within libxml.
|
||||
LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
|
||||
LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
|
||||
LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
|
||||
@@ -95,7 +95,7 @@ LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
|
||||
*/
|
||||
|
||||
/*
|
||||
* The way to overload the existing functions
|
||||
* The way to overload the existing functions.
|
||||
*/
|
||||
int xmlMemSetup (xmlFreeFunc freeFunc,
|
||||
xmlMallocFunc mallocFunc,
|
||||
@@ -107,12 +107,12 @@ int xmlMemGet (xmlFreeFunc *freeFunc,
|
||||
xmlStrdupFunc *strdupFunc);
|
||||
|
||||
/*
|
||||
* Initialization of the memory layer
|
||||
* Initialization of the memory layer.
|
||||
*/
|
||||
int xmlInitMemory (void);
|
||||
|
||||
/*
|
||||
* Those are specific to the XML debug memory wrapper
|
||||
* Those are specific to the XML debug memory wrapper.
|
||||
*/
|
||||
int xmlMemUsed (void);
|
||||
void xmlMemDisplay (FILE *fp);
|
||||
@@ -124,9 +124,9 @@ void xmlMemoryDump (void);
|
||||
* xmlMalloc:
|
||||
* @size: number of bytes to allocate
|
||||
*
|
||||
* Wrapper for the malloc() function used in the XML library
|
||||
* Wrapper for the malloc() function used in the XML library.
|
||||
*
|
||||
* Returns the pointer to the allocated area or NULL in case of error
|
||||
* Returns the pointer to the allocated area or NULL in case of error.
|
||||
*/
|
||||
#define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__)
|
||||
/**
|
||||
@@ -134,18 +134,18 @@ void xmlMemoryDump (void);
|
||||
* @ptr: pointer to the existing allocated area
|
||||
* @size: number of bytes to allocate
|
||||
*
|
||||
* Wrapper for the realloc() function used in the XML library
|
||||
* Wrapper for the realloc() function used in the XML library.
|
||||
*
|
||||
* Returns the pointer to the allocated area or NULL in case of error
|
||||
* Returns the pointer to the allocated area or NULL in case of error.
|
||||
*/
|
||||
#define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__)
|
||||
/**
|
||||
* xmlMemStrdup:
|
||||
* @str: pointer to the existing string
|
||||
*
|
||||
* Wrapper for the strdup() function, xmlStrdup() is usually preferred
|
||||
* Wrapper for the strdup() function, xmlStrdup() is usually preferred.
|
||||
*
|
||||
* Returns the pointer to the allocated area or NULL in case of error
|
||||
* Returns the pointer to the allocated area or NULL in case of error.
|
||||
*/
|
||||
#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
|
||||
|
||||
|
Reference in New Issue
Block a user