Picasso API  2.9
picasso_backport.h
Go to the documentation of this file.
1 
19 #ifndef _PICASSO_BACKPORT_H_
20 #define _PICASSO_BACKPORT_H_
21 
22 #include <stdlib.h>
23 #include "picasso.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
28 
44 typedef void* (*ps_malloc_func)(size_t size);
45 
50 typedef void (*ps_free_func)(void* ptr);
51 
58 typedef void* (*ps_calloc_func)(size_t num, size_t size);
59 
63 typedef struct _ps_memory_funcs {
64  ps_malloc_func mem_malloc;
68 
84 PEXPORT ps_bool PICAPI ps_set_memory_functions(const ps_memory_funcs* funcs);
85 
90 #ifdef __cplusplus
91 }
92 #endif /* __cplusplus */
93 
94 #endif /*_PICASSO_BACKPORT_H_*/
ps_malloc_func
void *(* ps_malloc_func)(size_t size)
Memory allocation function pointer type.
Definition: picasso_backport.h:44
picasso.h
ps_calloc_func
void *(* ps_calloc_func)(size_t num, size_t size)
Memory calloc function pointer type.
Definition: picasso_backport.h:58
ps_bool
int32_t ps_bool
boolean type
Definition: picasso.h:60
ps_memory_funcs
struct _ps_memory_funcs ps_memory_funcs
Memory allocator functions structure.
ps_free_func
void(* ps_free_func)(void *ptr)
Memory free function pointer type.
Definition: picasso_backport.h:50
_ps_memory_funcs
Memory allocator functions structure.
Definition: picasso_backport.h:63
ps_set_memory_functions
PEXPORT ps_bool PICAPI ps_set_memory_functions(const ps_memory_funcs *funcs)
Set global memory allocation functions.
_ps_memory_funcs::mem_calloc
ps_calloc_func mem_calloc
Definition: picasso_backport.h:66
_ps_memory_funcs::mem_free
ps_free_func mem_free
Definition: picasso_backport.h:65