ECC-1952: C API: Deprecate functions codes_context_set_memory_proc, codes_context_set_persistent_memory_proc and codes_context_set_buffer_memory_proc

This commit is contained in:
shahramn 2024-11-21 15:49:10 +00:00
parent 90f41b132a
commit c5a3a917f4
5 changed files with 0 additions and 106 deletions

View File

@ -599,22 +599,6 @@ void codes_context_set_data_quality_checks(codes_context* c, int val)
grib_context_set_data_quality_checks(c, 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);

View File

@ -1177,38 +1177,6 @@ void codes_context_set_samples_path(codes_context* c, const char* path);
void codes_context_set_debug(codes_context* c, int mode);
void codes_context_set_data_quality_checks(codes_context* c, int val);
/**
* Sets memory procedures of the context
*
* @param c : the context to be modified
* @param p_malloc : the memory allocation procedure to be set @see codes_malloc_proc
* @param p_free : the memory freeing procedure to be set @see codes_free_proc
* @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) ECCODES_DEPRECATED;
/**
* Sets memory procedures of the context for persistent data
*
* @param c : the context to be modified
* @param griballoc : the memory allocation procedure to be set @see codes_malloc_proc
* @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) ECCODES_DEPRECATED;
/**
* Sets memory procedures of the context for large buffers
*
* @param c : the context to be modified
* @param p_malloc : the memory allocation procedure to be set @see codes_malloc_proc
* @param p_free : the memory freeing procedure to be set @see codes_free_proc
* @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) ECCODES_DEPRECATED;
/**
* Sets the context printing procedure used for user interaction
*

View File

@ -434,9 +434,6 @@ void* grib_context_buffer_malloc(const grib_context* c, size_t size);
void grib_context_buffer_free(const grib_context* c, void* p);
void* grib_context_buffer_realloc(const grib_context* c, void* p, size_t size);
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);
void grib_context_set_persistent_memory_proc(grib_context* c, grib_malloc_proc m, grib_free_proc f);
void grib_context_set_buffer_memory_proc(grib_context* c, grib_malloc_proc m, grib_free_proc f, grib_realloc_proc r);
void grib_context_set_data_accessing_proc(grib_context* c, grib_data_read_proc read, grib_data_write_proc write, grib_data_tell_proc tell);
void grib_context_log(const grib_context* c, int level, const char* fmt, ...);
void grib_context_print(const grib_context* c, void* descriptor, const char* fmt, ...);

View File

@ -1174,38 +1174,6 @@ void grib_context_set_samples_path(grib_context* c, const char* path);
void grib_context_set_debug(grib_context* c, int mode);
void grib_context_set_data_quality_checks(grib_context* c, int val);
/**
* Sets memory procedures of the context
*
* @param c : the context to be modified
* @param griballoc : the memory allocation procedure to be set @see grib_malloc_proc
* @param gribfree : the memory freeing procedure to be set @see grib_free_proc
*/
void grib_context_set_memory_proc(grib_context* c, grib_malloc_proc griballoc,
grib_free_proc gribfree,
grib_realloc_proc gribrealloc);
/**
* Sets memory procedures of the context for persistent data
*
* @param c : the context to be modified
* @param griballoc : the memory allocation procedure to be set @see grib_malloc_proc
* @param gribfree : the memory freeing procedure to be set @see grib_free_proc
*/
void grib_context_set_persistent_memory_proc(grib_context* c, grib_malloc_proc griballoc,
grib_free_proc gribfree);
/**
* Sets memory procedures of the context for large buffers
*
* @param c : the context to be modified
* @param griballoc : the memory allocation procedure to be set @see grib_malloc_proc
* @param gribfree : the memory freeing procedure to be set @see grib_free_proc
*/
void grib_context_set_buffer_memory_proc(grib_context* c, grib_malloc_proc griballoc,
grib_free_proc gribfree,
grib_realloc_proc gribrealloc);
/**
* Sets the context printing procedure used for user interaction
*

View File

@ -1026,29 +1026,6 @@ void* grib_context_buffer_malloc_clear(const grib_context* c, size_t size)
return p;
}
void grib_context_set_memory_proc(grib_context* c, grib_malloc_proc m, grib_free_proc f, grib_realloc_proc r)
{
fprintf(stderr, "ECCODES WARNING : The %s function is deprecated and will be removed in a future release.\n", __func__);
c->free_mem = f;
c->alloc_mem = m;
c->realloc_mem = r;
}
void grib_context_set_persistent_memory_proc(grib_context* c, grib_malloc_proc m, grib_free_proc f)
{
fprintf(stderr, "ECCODES WARNING : The %s function is deprecated and will be removed in a future release.\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, "ECCODES WARNING : The %s function is deprecated and will be removed in a future release.\n", __func__);
c->free_buffer_mem = f;
c->alloc_buffer_mem = m;
c->realloc_buffer_mem = r;
}
void grib_context_set_data_accessing_proc(grib_context* c, grib_data_read_proc read, grib_data_write_proc write, grib_data_tell_proc tell)
{
c->read = read;