2022-05-02 15:29:02 +02:00
|
|
|
#ifndef MEM_UTILS_H_
|
|
|
|
|
#define MEM_UTILS_H_
|
|
|
|
|
|
2022-05-16 10:59:20 +02:00
|
|
|
#ifdef HAVE_EIP712_FULL_SUPPORT
|
|
|
|
|
|
2022-05-02 15:29:02 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
2022-06-30 18:43:01 +02:00
|
|
|
#define MEM_ALLOC_AND_ALIGN_TYPE(type) mem_alloc_and_align(sizeof(type), __alignof__(type))
|
2022-05-05 15:21:39 +02:00
|
|
|
|
2022-04-26 18:15:53 +02:00
|
|
|
char *mem_alloc_and_copy_char(char c);
|
|
|
|
|
void *mem_alloc_and_copy(const void *data, size_t size);
|
2022-05-05 15:21:39 +02:00
|
|
|
char *mem_alloc_and_format_uint(uint32_t value, uint8_t *const written_chars);
|
|
|
|
|
void *mem_alloc_and_align(size_t size, size_t alignment);
|
2022-05-02 15:29:02 +02:00
|
|
|
|
2022-05-16 10:59:20 +02:00
|
|
|
#endif // HAVE_EIP712_FULL_SUPPORT
|
|
|
|
|
|
2022-05-02 15:29:02 +02:00
|
|
|
#endif // MEM_UTILS_H_
|