diff options
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() */ /************************************************************************/ |
