exif-mem.h
Go to the documentation of this file.
/* exif-mem.h
*
* Copyright (c) 2003 Lutz Mueller <lutz@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*/
#ifndef __EXIF_MEM_H__
#define __EXIF_MEM_H__
#include <libexif/exif-utils.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef void * (* ExifMemAllocFunc) (ExifLong s);
typedef void * (* ExifMemReallocFunc) (void *p, ExifLong s);
typedef void (* ExifMemFreeFunc) (void *p);
typedef struct _ExifMem ExifMem;
ExifMem *exif_mem_new (ExifMemAllocFunc a, ExifMemReallocFunc r,
ExifMemFreeFunc f);
void exif_mem_ref (ExifMem *);
void exif_mem_unref (ExifMem *);
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);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __EXIF_MEM_H__ */
ExifMemReallocFunc
void *(* ExifMemReallocFunc)(void *p, ExifLong s)
Should work like realloc()
Definition: exif-mem.h:47
exif_mem_new_default
ExifMem * exif_mem_new_default(void)
Create a new ExifMem with default values for your convenience.
Definition: exif-mem.c:95
exif_mem_new
ExifMem * exif_mem_new(ExifMemAllocFunc a, ExifMemReallocFunc r, ExifMemFreeFunc f)
Create a new ExifMem.
Definition: exif-mem.c:34
ExifMemAllocFunc
void *(* ExifMemAllocFunc)(ExifLong s)
Should work like calloc()
Definition: exif-mem.h:39
exif-utils.h
EXIF data manipulation functions and types.
exif_mem_unref
void exif_mem_unref(ExifMem *)
Unrefcount an ExifMem.
Definition: exif-mem.c:61
ExifMem
struct _ExifMem ExifMem
ExifMem define a memory allocator.
Definition: exif-mem.h:57
exif-mem.h
Define the ExifMem data type and the associated functions. ExifMem defines the memory management func...
ExifMemFreeFunc
void(* ExifMemFreeFunc)(void *p)
Free method for ExifMem.
Definition: exif-mem.h:54
ExifLong
uint32_t ExifLong
EXIF Unsigned Long data type.
Definition: exif-utils.h:54
exif_mem_ref
void exif_mem_ref(ExifMem *)
Refcount an ExifMem.
Definition: exif-mem.c:54