summaryrefslogtreecommitdiff
path: root/lib/gnutls_mem.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-12-06 17:14:22 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-12-06 17:14:22 +0000
commitb0d4b6150fac1f17c61058a19e86ccedc2ff87c2 (patch)
tree4ec51caa2caf3ac4b876240d7e45c80863a483fe /lib/gnutls_mem.h
parent84db053194b3e76290e75e6c4a268b2143774687 (diff)
downloadgnutls-b0d4b6150fac1f17c61058a19e86ccedc2ff87c2.tar.gz
Added the new functions gnutls_get_malloc_function(), gnutls_get_free_function(). Also changed the way callback functions must allocate data. They now need to use these functions, instead of just calling malloc().
Diffstat (limited to 'lib/gnutls_mem.h')
-rw-r--r--lib/gnutls_mem.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/gnutls_mem.h b/lib/gnutls_mem.h
index aedf27efb0..5a95d1da59 100644
--- a/lib/gnutls_mem.h
+++ b/lib/gnutls_mem.h
@@ -19,16 +19,16 @@ typedef void svoid; /* for functions that allocate using gnutls_secure_malloc */
# define gnutls_afree gnutls_free
#endif /* HAVE_ALLOCA */
-typedef void* (*ALLOC_FUNC)(size_t);
-typedef void (*FREE_FUNC)(void*);
-typedef void* (*REALLOC_FUNC)(void*, size_t);
+typedef void* (*gnutls_alloc_function)(size_t);
+typedef void (*gnutls_free_function)(void*);
+typedef void* (*gnutls_realloc_function)(void*, size_t);
-extern ALLOC_FUNC gnutls_secure_malloc;
-extern ALLOC_FUNC gnutls_malloc;
-extern FREE_FUNC gnutls_free;
+extern gnutls_alloc_function gnutls_secure_malloc;
+extern gnutls_alloc_function gnutls_malloc;
+extern gnutls_free_function gnutls_free;
extern int (*_gnutls_is_secure_memory)(const void*);
-extern REALLOC_FUNC gnutls_realloc;
+extern gnutls_realloc_function gnutls_realloc;
extern void* (*gnutls_calloc)(size_t, size_t);
extern char* (*gnutls_strdup)( const char*);