EXIF library (libexif) API 0.6.22
exif-mem.h File Reference

Define the ExifMem data type and the associated functions. More...

#include <libexif/exifutil.h>

Go to the source code of this file.

Typedefs

typedef struct _ExifMem ExifMem
 
typedef void *EXIF_CALLBACK(* ExifMemAllocFunc) (ExifLong s)
 Should work like calloc()
 
typedef void *EXIF_CALLBACK(* ExifMemReallocFunc) (void *p, ExifLong s)
 Should work like realloc()
 
typedef void EXIF_CALLBACK(* ExifMemFreeFunc) (void *p)
 Free method for ExifMem.
 

Functions

 EXIF_API (ExifMem *) exif_mem_new(ExifMemAllocFunc a
 Create a new ExifMem.
 
 EXIF_API (void) exif_mem_ref(ExifMem *)
 Refcount an ExifMem.
 
 EXIF_API (void *) exif_mem_alloc(ExifMem *m
 

Variables

ExifMemReallocFunc r
 
ExifMemReallocFunc ExifMemFreeFunc f
 
ExifLong s
 
void * p
 

Detailed Description

Define the ExifMem data type and the associated functions.

ExifMem defines the memory management functions used within libexif.

Typedef Documentation

◆ ExifMemAllocFunc

typedef void *EXIF_CALLBACK(* ExifMemAllocFunc) (ExifLong s)

Should work like calloc()

Parameters
[in]sthe size of the block to allocate.
Returns
the allocated memory and initialized.

◆ ExifMemFreeFunc

typedef void EXIF_CALLBACK(* ExifMemFreeFunc) (void *p)

Free method for ExifMem.

Parameters
[in]pthe pointer to free
Returns
the freed pointer

◆ ExifMemReallocFunc

typedef void *EXIF_CALLBACK(* ExifMemReallocFunc) (void *p, ExifLong s)

Should work like realloc()

Parameters
[in]pthe pointer to reallocate
[in]sthe size of the reallocated block
Returns
allocated memory

Function Documentation

◆ EXIF_API() [1/2]

EXIF_API ( ExifMem *  )

Create a new ExifMem.

Create a new ExifMem with default values for your convenience.

Parameters
[in]athe allocator function
[in]rthe reallocator function
[in]fthe free function
Returns
allocated ExifMem, or NULL on error
Returns
return a new default ExifMem

◆ EXIF_API() [2/2]

EXIF_API ( void  )

Refcount an ExifMem.

Unrefcount an ExifMem.

If the refcount reaches 0, the ExifMem is freed