mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Add POLARSSL_DEPRECATED_{WARNING,REMOVED}
This commit is contained in:
@ -37,16 +37,26 @@
|
||||
#include "platform.h"
|
||||
#include "memory_buffer_alloc.h"
|
||||
|
||||
#if ! defined(POLARSSL_DEPRECATED_REMOVED)
|
||||
#if defined(POLARSSL_DEPRECATED_WARNING)
|
||||
#define DEPRECATED __attribute__((deprecated))
|
||||
#else
|
||||
#define DEPRECATED
|
||||
#endif
|
||||
/**
|
||||
* \brief Set malloc() / free() callback
|
||||
*
|
||||
* \deprecated Use platform_set_malloc_free instead
|
||||
*/
|
||||
int memory_set_own( void * (*malloc_func)( size_t ),
|
||||
void (*free_func)( void * ) ) DEPRECATED;
|
||||
int memory_set_own( void * (*malloc_func)( size_t ),
|
||||
void (*free_func)( void * ) )
|
||||
{
|
||||
return platform_set_malloc_free( malloc_func, free_func );
|
||||
}
|
||||
#undef DEPRECATED
|
||||
#endif /* POLARSSL_DEPRECATED_REMOVED */
|
||||
|
||||
|
||||
#endif /* memory.h */
|
||||
|
Reference in New Issue
Block a user