EXIF library (libexif) Internals
0.6.24
|
Define the ExifMem data type and the associated functions. More...
#include <libexif/exif-utils.h>
Go to the source code of this file.
Typedefs | |
typedef void *(* | ExifMemAllocFunc) (ExifLong s) |
Should work like calloc() More... | |
typedef void *(* | ExifMemReallocFunc) (void *p, ExifLong s) |
Should work like realloc() More... | |
typedef void(* | ExifMemFreeFunc) (void *p) |
Free method for ExifMem. More... | |
typedef struct _ExifMem | ExifMem |
ExifMem define a memory allocator. More... | |
Functions | |
ExifMem * | exif_mem_new (ExifMemAllocFunc a, ExifMemReallocFunc r, ExifMemFreeFunc f) |
Create a new ExifMem. More... | |
void | exif_mem_ref (ExifMem *) |
Refcount an ExifMem. More... | |
void | exif_mem_unref (ExifMem *) |
Unrefcount an ExifMem. More... | |
void * | exif_mem_alloc (ExifMem *m, ExifLong s) |
void * | exif_mem_realloc (ExifMem *m, void *p, ExifLong s) |
void | exif_mem_free (ExifMem *m, void *p) |
ExifMem * | exif_mem_new_default (void) |
Create a new ExifMem with default values for your convenience. More... | |
Define the ExifMem data type and the associated functions.
ExifMem defines the memory management functions used within libexif.
Definition in file exif-mem.h.
ExifMem define a memory allocator.
Definition at line 54 of file exif-mem.h.
typedef void*(* ExifMemAllocFunc) (ExifLong s) |
Should work like calloc()
[in] | s | the size of the block to allocate. |
Definition at line 39 of file exif-mem.h.
typedef void(* ExifMemFreeFunc) (void *p) |
Free method for ExifMem.
[in] | p | the pointer to free |
Definition at line 54 of file exif-mem.h.
typedef void*(* ExifMemReallocFunc) (void *p, ExifLong s) |
Should work like realloc()
[in] | p | the pointer to reallocate |
[in] | s | the size of the reallocated block |
Definition at line 47 of file exif-mem.h.
Definition at line 79 of file exif-mem.c.
References _ExifMem::alloc_func, and _ExifMem::realloc_func.
Referenced by exif_content_new_mem(), exif_data_alloc(), exif_data_new_mem(), exif_entry_alloc(), exif_entry_get_value(), exif_entry_new_mem(), exif_loader_alloc(), exif_loader_new_mem(), exif_log_new_mem(), exif_mnote_data_apple_load(), exif_mnote_data_apple_new(), exif_mnote_data_canon_load(), exif_mnote_data_canon_new(), exif_mnote_data_canon_save(), exif_mnote_data_construct(), exif_mnote_data_fuji_load(), exif_mnote_data_fuji_new(), exif_mnote_data_fuji_save(), exif_mnote_data_olympus_load(), exif_mnote_data_olympus_new(), exif_mnote_data_olympus_save(), exif_mnote_data_pentax_load(), exif_mnote_data_pentax_new(), exif_mnote_data_pentax_save(), and main().
void exif_mem_free | ( | ExifMem * | m, |
void * | p | ||
) |
Definition at line 69 of file exif-mem.c.
References _ExifMem::free_func.
Referenced by exif_content_free(), exif_content_new_mem(), exif_content_remove_entry(), exif_data_free(), exif_data_load_data_thumbnail(), exif_data_new_mem(), exif_data_save_data_entry(), exif_entry_fix(), exif_entry_free(), exif_entry_get_value(), exif_entry_new_mem(), exif_entry_realloc(), exif_loader_free(), exif_loader_reset(), exif_log_free(), exif_mem_unref(), exif_mnote_data_apple_free(), exif_mnote_data_canon_clear(), exif_mnote_data_canon_load(), exif_mnote_data_free(), exif_mnote_data_fuji_clear(), exif_mnote_data_olympus_clear(), and exif_mnote_data_pentax_clear().
ExifMem* exif_mem_new | ( | ExifMemAllocFunc | a, |
ExifMemReallocFunc | r, | ||
ExifMemFreeFunc | f | ||
) |
Create a new ExifMem.
[in] | a | the allocator function |
[in] | r | the reallocator function |
[in] | f | the free function |
Definition at line 34 of file exif-mem.c.
References _ExifMem::alloc_func, _ExifMem::free_func, _ExifMem::realloc_func, and _ExifMem::ref_count.
Referenced by exif_mem_new_default().
ExifMem* exif_mem_new_default | ( | void | ) |
Create a new ExifMem with default values for your convenience.
Definition at line 95 of file exif-mem.c.
References exif_mem_alloc_func(), exif_mem_free_func(), exif_mem_new(), and exif_mem_realloc_func().
Referenced by exif_content_new(), exif_data_new(), exif_entry_new(), exif_loader_new(), exif_log_new(), and main().
Definition at line 89 of file exif-mem.c.
References _ExifMem::realloc_func.
Referenced by exif_content_add_entry(), exif_content_remove_entry(), exif_data_save_data_content(), exif_data_save_data_entry(), exif_entry_realloc(), exif_mnote_data_canon_save(), exif_mnote_data_fuji_save(), exif_mnote_data_olympus_save(), and exif_mnote_data_pentax_save().
void exif_mem_ref | ( | ExifMem * | mem | ) |
Refcount an ExifMem.
Definition at line 54 of file exif-mem.c.
References _ExifMem::ref_count.
Referenced by exif_content_new_mem(), exif_data_new_mem(), exif_entry_new_mem(), exif_loader_new_mem(), exif_log_new_mem(), and exif_mnote_data_construct().
void exif_mem_unref | ( | ExifMem * | mem | ) |
Unrefcount an ExifMem.
If the refcount reaches 0, the ExifMem is freed
Definition at line 61 of file exif-mem.c.
References exif_mem_free(), and _ExifMem::ref_count.
Referenced by exif_content_free(), exif_content_new(), exif_data_free(), exif_data_new(), exif_entry_free(), exif_entry_new(), exif_loader_free(), exif_loader_new(), exif_log_free(), exif_log_new(), exif_mnote_data_free(), and main().