From 2c08430d3f68125bfa855d6fbac7ec7ed15e1fce Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 31 Dec 2015 13:23:48 +0000 Subject: [PATCH] ECC-203: Remove the function grib_context_new --- src/eccodes.c | 4 ---- src/eccodes.h | 8 -------- src/grib_api.h | 8 -------- src/grib_api_prototypes.h | 1 - src/grib_context.c | 4 ++-- 5 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/eccodes.c b/src/eccodes.c index aa31e516c..f2daa4327 100644 --- a/src/eccodes.c +++ b/src/eccodes.c @@ -510,10 +510,6 @@ int codes_points_get_values(grib_handle* h, grib_points* points, double* val) { return grib_points_get_values(h,points,val); } -grib_context* codes_context_new(grib_context* c) -{ - return grib_context_new(c); -} void codes_context_delete(grib_context* c) { grib_context_delete(c); diff --git a/src/eccodes.h b/src/eccodes.h index 9b6877971..1c3dfcdba 100644 --- a/src/eccodes.h +++ b/src/eccodes.h @@ -877,14 +877,6 @@ void codes_dump_action_tree(codes_context* c, FILE* f) ; */ codes_context* codes_context_get_default(void); -/** -* Create and allocate a new context from a parent context. -* -* @param c : the context to be cloned, NULL for default context -* @return the new and empty context, NULL if error -*/ -codes_context* codes_context_new(codes_context* c); - /** * Frees the cached definition files of the context * diff --git a/src/grib_api.h b/src/grib_api.h index ff19a5a9d..999e846c5 100644 --- a/src/grib_api.h +++ b/src/grib_api.h @@ -1057,14 +1057,6 @@ typedef int (*grib_data_eof_proc) (const grib_context* c, void *stream); */ grib_context* grib_context_get_default(void); -/** -* Create and allocate a new context from a parent context. -* -* @param c : the context to be cloned, NULL for default context -* @return the new and empty context, NULL if error -*/ -grib_context* grib_context_new (grib_context* c); - /** * Frees the cached definition files of the context * diff --git a/src/grib_api_prototypes.h b/src/grib_api_prototypes.h index a4321bc3d..f79ed1dec 100644 --- a/src/grib_api_prototypes.h +++ b/src/grib_api_prototypes.h @@ -914,7 +914,6 @@ void grib_context_set_logging_proc(grib_context *c, grib_log_proc p); long grib_get_api_version(void); void grib_print_api_version(FILE *out); grib_context *grib_context_get_default(void); -grib_context *grib_context_new(grib_context *parent); char *grib_context_full_defs_path(grib_context *c, const char *basename); char *grib_samples_path(const grib_context *c); void grib_context_free(const grib_context *c, void *p); diff --git a/src/grib_context.c b/src/grib_context.c index 5d702d73c..41219ffca 100644 --- a/src/grib_context.c +++ b/src/grib_context.c @@ -471,8 +471,7 @@ grib_context* grib_context_get_default() return &default_grib_context; } -/* TODO: use parent */ - +#if 0 /* function removed */ grib_context* grib_context_new(grib_context* parent) { grib_context* c; @@ -517,6 +516,7 @@ grib_context* grib_context_new(grib_context* parent) GRIB_MUTEX_UNLOCK(&(parent->mutex)); return c; } +#endif /* function removed */ /* GRIB-235: Resolve path to expand symbolic links etc */ static char* resolve_path(grib_context* c, char* path)