From aa46197d66ce70ece382bf955326c46b13f35864 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sat, 14 Nov 2020 22:55:31 +0100 Subject: Weed out proj_api.h datatypes and replace them with their proj.h counterparts --- src/param.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/param.cpp') diff --git a/src/param.cpp b/src/param.cpp index 289faca3..9a3888e1 100644 --- a/src/param.cpp +++ b/src/param.cpp @@ -151,7 +151,7 @@ paralist *pj_param_exists (paralist *list, const char *parameter) { /* */ /************************************************************************/ -PROJVALUE pj_param (projCtx ctx, paralist *pl, const char *opt) { +PROJVALUE pj_param (PJ_CONTEXT *ctx, paralist *pl, const char *opt) { int type; unsigned l; -- cgit v1.2.3 From a74b985b5006c2d279353a245cfcb850cf7fcc94 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 17 Nov 2020 12:54:24 +0100 Subject: Remove pj_ctx_* functions and use their proj_context counterparts --- src/param.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/param.cpp') diff --git a/src/param.cpp b/src/param.cpp index 9a3888e1..3e13b391 100644 --- a/src/param.cpp +++ b/src/param.cpp @@ -220,7 +220,7 @@ PROJVALUE pj_param (PJ_CONTEXT *ctx, paralist *pl, const char *opt) { value.i = 1; break; default: - pj_ctx_set_errno (ctx, PJD_ERR_INVALID_BOOLEAN_PARAM); + proj_context_errno_set (ctx, PJD_ERR_INVALID_BOOLEAN_PARAM); value.i = 0; break; } -- 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/param.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/param.cpp') diff --git a/src/param.cpp b/src/param.cpp index 3e13b391..28d6bc3e 100644 --- a/src/param.cpp +++ b/src/param.cpp @@ -38,7 +38,7 @@ static void unquote_string(char* param_str) { paralist *pj_mkparam(const char *str) { paralist *newitem; - if((newitem = (paralist *)pj_malloc(sizeof(paralist) + strlen(str))) != nullptr) { + if((newitem = (paralist *)malloc(sizeof(paralist) + strlen(str))) != nullptr) { newitem->used = 0; newitem->next = nullptr; if (*str == '+') @@ -82,7 +82,7 @@ paralist *pj_mkparam_ws (const char *str, const char **next_str) { *next_str = str + len; /* Use calloc to automagically 0-terminate the copy */ - newitem = (paralist *) pj_calloc (1, sizeof(paralist) + len + 1); + newitem = (paralist *) calloc (1, sizeof(paralist) + len + 1); if (nullptr==newitem) return nullptr; memcpy(newitem->param, str, len); -- cgit v1.2.3