mirror of https://github.com/ecmwf/eccodes.git
ECC-1952: C API: Deprecate functions
This commit is contained in:
parent
b8aedee6ec
commit
1c45f774de
|
@ -601,16 +601,20 @@ void codes_context_set_data_quality_checks(codes_context* c, int val)
|
|||
|
||||
void codes_context_set_memory_proc(codes_context* c, grib_malloc_proc p_malloc, grib_free_proc p_free, grib_realloc_proc p_realloc)
|
||||
{
|
||||
// This function is deprecated and will later be removed
|
||||
grib_context_set_memory_proc(c, p_malloc, p_free, p_realloc);
|
||||
}
|
||||
void codes_context_set_persistent_memory_proc(codes_context* c, grib_malloc_proc p_malloc, grib_free_proc p_free)
|
||||
{
|
||||
// This function is deprecated and will later be removed
|
||||
grib_context_set_persistent_memory_proc(c, p_malloc, p_free);
|
||||
}
|
||||
void codes_context_set_buffer_memory_proc(codes_context* c, grib_malloc_proc p_malloc, grib_free_proc p_free, grib_realloc_proc p_realloc)
|
||||
{
|
||||
// This function is deprecated and will later be removed
|
||||
grib_context_set_buffer_memory_proc(c, p_malloc, p_free, p_realloc);
|
||||
}
|
||||
|
||||
void codes_context_set_print_proc(codes_context* c, grib_print_proc p_print)
|
||||
{
|
||||
grib_context_set_print_proc(c, p_print);
|
||||
|
|
|
@ -1103,7 +1103,7 @@ typedef int (*codes_data_eof_proc)(const codes_context* c, void* stream);
|
|||
/**
|
||||
* Get the static default context
|
||||
*
|
||||
* @return the default context, NULL it the context is not available
|
||||
* @return the default context, NULL if the context is not available
|
||||
*/
|
||||
codes_context* codes_context_get_default(void);
|
||||
|
||||
|
@ -1186,7 +1186,7 @@ void codes_context_set_data_quality_checks(codes_context* c, int val);
|
|||
* @param p_realloc : the memory reallocation procedure to be set @see codes_realloc_proc
|
||||
*/
|
||||
void codes_context_set_memory_proc(codes_context* c, codes_malloc_proc p_malloc,
|
||||
codes_free_proc p_free, codes_realloc_proc p_realloc);
|
||||
codes_free_proc p_free, codes_realloc_proc p_realloc) ECCODES_DEPRECATED;
|
||||
|
||||
/**
|
||||
* Sets memory procedures of the context for persistent data
|
||||
|
@ -1196,7 +1196,7 @@ void codes_context_set_memory_proc(codes_context* c, codes_malloc_proc p_malloc,
|
|||
* @param gribfree : the memory freeing procedure to be set @see codes_free_proc
|
||||
*/
|
||||
void codes_context_set_persistent_memory_proc(codes_context* c, codes_malloc_proc p_malloc,
|
||||
codes_free_proc p_free);
|
||||
codes_free_proc p_free) ECCODES_DEPRECATED;
|
||||
|
||||
/**
|
||||
* Sets memory procedures of the context for large buffers
|
||||
|
@ -1207,7 +1207,7 @@ void codes_context_set_persistent_memory_proc(codes_context* c, codes_malloc_pro
|
|||
* @param p_free : the memory reallocation procedure to be set @see codes_realloc_proc
|
||||
*/
|
||||
void codes_context_set_buffer_memory_proc(codes_context* c, codes_malloc_proc p_malloc,
|
||||
codes_free_proc p_free, codes_realloc_proc p_realloc);
|
||||
codes_free_proc p_free, codes_realloc_proc p_realloc) ECCODES_DEPRECATED;
|
||||
|
||||
/**
|
||||
* Sets the context printing procedure used for user interaction
|
||||
|
|
|
@ -1105,7 +1105,7 @@ typedef int (*grib_data_eof_proc)(const grib_context* c, void* stream);
|
|||
/**
|
||||
* Get the static default context
|
||||
*
|
||||
* @return the default context, NULL it the context is not available
|
||||
* @return the default context, NULL if the context is not available
|
||||
*/
|
||||
grib_context* grib_context_get_default(void);
|
||||
|
||||
|
|
|
@ -1027,6 +1027,7 @@ void* grib_context_buffer_malloc_clear(const grib_context* c, size_t size)
|
|||
|
||||
void grib_context_set_memory_proc(grib_context* c, grib_malloc_proc m, grib_free_proc f, grib_realloc_proc r)
|
||||
{
|
||||
fprintf(stderr, "Warning: The %s function is deprecated and will be removed later.\n", __func__);
|
||||
c->free_mem = f;
|
||||
c->alloc_mem = m;
|
||||
c->realloc_mem = r;
|
||||
|
@ -1034,12 +1035,14 @@ void grib_context_set_memory_proc(grib_context* c, grib_malloc_proc m, grib_free
|
|||
|
||||
void grib_context_set_persistent_memory_proc(grib_context* c, grib_malloc_proc m, grib_free_proc f)
|
||||
{
|
||||
fprintf(stderr, "Warning: The %s function is deprecated and will be removed later.\n", __func__);
|
||||
c->free_persistent_mem = f;
|
||||
c->alloc_persistent_mem = m;
|
||||
}
|
||||
|
||||
void grib_context_set_buffer_memory_proc(grib_context* c, grib_malloc_proc m, grib_free_proc f, grib_realloc_proc r)
|
||||
{
|
||||
fprintf(stderr, "Warning: The %s function is deprecated and will be removed later.\n", __func__);
|
||||
c->free_buffer_mem = f;
|
||||
c->alloc_buffer_mem = m;
|
||||
c->realloc_buffer_mem = r;
|
||||
|
|
Loading…
Reference in New Issue