mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-23 06:16:42 +01:00
Add POLARSSL_DEPRECATED_{WARNING,REMOVED}
This commit is contained in:
parent
85b6600ab2
commit
c70581c272
13 changed files with 105 additions and 9 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue