From 56f0ad70054eea15e9671cd67aafd14bf7c11c74 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Wed, 18 Nov 2020 10:43:16 +0100 Subject: Remove pj_errno and related functions --- src/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pipeline.cpp') diff --git a/src/pipeline.cpp b/src/pipeline.cpp index 80ee0397..56a80848 100644 --- a/src/pipeline.cpp +++ b/src/pipeline.cpp @@ -533,7 +533,7 @@ PJ *OPERATION(pipeline,0) { int err_to_report = proj_errno(P); if (0==err_to_report) err_to_report = PJD_ERR_MALFORMED_PIPELINE; - proj_log_error (P, "Pipeline: Bad step definition: %s (%s)", current_argv[0], pj_strerrno (err_to_report)); + proj_log_error (P, "Pipeline: Bad step definition: %s (%s)", current_argv[0], proj_errno_string (err_to_report)); return destructor (P, err_to_report); /* ERROR: bad pipeline def */ } next_step->parent = P; -- cgit v1.2.3 From 046270a85faf20f38d01e02942d197db74bb8542 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Fri, 20 Nov 2020 16:37:12 +0100 Subject: Remove old pj_ memory (de)allocation functions Gone are pj_malloc, pj_calloc, pj_dalloc and pj_dealloc. Their primary function as API memory functions in proj_api.h is no longer there and the other use as a workaround for old errno problems is no longer valid either. Replaced with malloc and free across the codebase. --- src/pipeline.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/pipeline.cpp') diff --git a/src/pipeline.cpp b/src/pipeline.cpp index 56a80848..e9d11604 100644 --- a/src/pipeline.cpp +++ b/src/pipeline.cpp @@ -294,8 +294,8 @@ static PJ *destructor (PJ *P, int errlev) { auto pipeline = static_cast(P->opaque); - pj_dealloc (pipeline->argv); - pj_dealloc (pipeline->current_argv); + free (pipeline->argv); + free (pipeline->current_argv); delete pipeline; P->opaque = nullptr; @@ -321,7 +321,7 @@ static const char *argv_sentinel = "step"; static char **argv_params (paralist *params, size_t argc) { char **argv; size_t i = 0; - argv = static_cast(pj_calloc (argc, sizeof (char *))); + argv = static_cast(calloc (argc, sizeof (char *))); if (nullptr==argv) return nullptr; for (; params != nullptr; params = params->next) @@ -461,7 +461,7 @@ PJ *OPERATION(pipeline,0) { if (nullptr==argv) return destructor (P, ENOMEM); - pipeline->current_argv = current_argv = static_cast(pj_calloc (argc, sizeof (char *))); + pipeline->current_argv = current_argv = static_cast(calloc (argc, sizeof (char *))); if (nullptr==current_argv) return destructor (P, ENOMEM); @@ -679,7 +679,7 @@ static PJ_COORD pop(PJ_COORD point, PJ *P) { static PJ *setup_pushpop(PJ *P) { - auto pushpop = static_cast(pj_calloc (1, sizeof(struct PushPop))); + auto pushpop = static_cast(calloc (1, sizeof(struct PushPop))); P->opaque = pushpop; if (nullptr==P->opaque) return destructor(P, ENOMEM); -- cgit v1.2.3