diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-12-29 19:27:30 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-12-29 19:27:30 +0100 |
| commit | 0ee297eaef992265e8ccbf2cd4f8bde9a217a9fe (patch) | |
| tree | 1d6793743d683679215d2d23cfa87a997c9742a9 /src/ctx.cpp | |
| parent | 9b2b96ef7a343831753679567893d85998e9c9ea (diff) | |
| download | PROJ-0ee297eaef992265e8ccbf2cd4f8bde9a217a9fe.tar.gz PROJ-0ee297eaef992265e8ccbf2cd4f8bde9a217a9fe.zip | |
Experimantal C API: add a proj_assign_context() for advanced usage
Diffstat (limited to 'src/ctx.cpp')
| -rw-r--r-- | src/ctx.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ctx.cpp b/src/ctx.cpp index ab51d6c1..1742ee87 100644 --- a/src/ctx.cpp +++ b/src/ctx.cpp @@ -29,6 +29,7 @@ #include <stdlib.h> #include <string.h> +#include "proj_experimental.h" #include "proj_internal.h" #include "projects.h" @@ -64,6 +65,22 @@ void pj_set_ctx( projPJ pj, projCtx ctx ) } /************************************************************************/ +/* proj_assign_context() */ +/************************************************************************/ + +/** \brief Re-assign a context to a PJ* object. + * + * This may be useful if the PJ* has been created with a context that is + * thread-specific, and is later used in another thread. In that case, + * the user may want to assign another thread-specific context to the + * object. + */ +void proj_assign_context( PJ* pj, PJ_CONTEXT* ctx ) +{ + pj_set_ctx( pj, ctx ); +} + +/************************************************************************/ /* pj_get_default_ctx() */ /************************************************************************/ |
