diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2020-11-26 20:58:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-26 20:58:01 +0100 |
| commit | 3cb26a406a7e1a964f5f3b5caf3c624222664fb2 (patch) | |
| tree | 414dad90bd94170f6e619197b9a47bfca096d322 /src/initcache.cpp | |
| parent | f5b3616bb03f8e52a5e5a23704d645492a662393 (diff) | |
| parent | d9205b9245388f23b65917a21ec72d6bec15d035 (diff) | |
| download | PROJ-3cb26a406a7e1a964f5f3b5caf3c624222664fb2.tar.gz PROJ-3cb26a406a7e1a964f5f3b5caf3c624222664fb2.zip | |
Merge pull request #2403 from kbevers/remove-proj_api.h
Remove proj_api.h
Diffstat (limited to 'src/initcache.cpp')
| -rw-r--r-- | src/initcache.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/initcache.cpp b/src/initcache.cpp index af20fb82..cf9460ab 100644 --- a/src/initcache.cpp +++ b/src/initcache.cpp @@ -48,7 +48,7 @@ paralist *pj_clone_paralist( const paralist *list) for( ; list != nullptr; list = list->next ) { paralist *newitem = (paralist *) - pj_malloc(sizeof(paralist) + strlen(list->param)); + malloc(sizeof(paralist) + strlen(list->param)); newitem->used = 0; newitem->next = nullptr; @@ -83,17 +83,17 @@ void pj_clear_initcache() { paralist *n, *t = cache_paralist[i]; - pj_dalloc( cache_key[i] ); + free( cache_key[i] ); /* free parameter list elements */ for (; t != nullptr; t = n) { n = t->next; - pj_dalloc(t); + free(t); } } - pj_dalloc( cache_key ); - pj_dalloc( cache_paralist ); + free( cache_key ); + free( cache_paralist ); cache_count = 0; cache_alloc= 0; cache_key = nullptr; @@ -151,29 +151,29 @@ void pj_insert_initcache( const char *filekey, const paralist *list ) cache_alloc = cache_alloc * 2 + 15; - cache_key_new = (char **) pj_malloc(sizeof(char*) * cache_alloc); + cache_key_new = (char **) malloc(sizeof(char*) * cache_alloc); if( cache_key && cache_count ) { memcpy( cache_key_new, cache_key, sizeof(char*) * cache_count); } - pj_dalloc( cache_key ); + free( cache_key ); cache_key = cache_key_new; cache_paralist_new = (paralist **) - pj_malloc(sizeof(paralist*) * cache_alloc); + malloc(sizeof(paralist*) * cache_alloc); if( cache_paralist && cache_count ) { memcpy( cache_paralist_new, cache_paralist, sizeof(paralist*) * cache_count ); } - pj_dalloc( cache_paralist ); + free( cache_paralist ); cache_paralist = cache_paralist_new; } /* ** Duplicate the filekey and paralist, and insert in cache. */ - cache_key[cache_count] = (char *) pj_malloc(strlen(filekey)+1); + cache_key[cache_count] = (char *) malloc(strlen(filekey)+1); strcpy( cache_key[cache_count], filekey ); cache_paralist[cache_count] = pj_clone_paralist( list ); |
