MCPcopy Create free account
hub / github.com/OSGeo/gdal / CPLSetThreadLocalConfigOptions

Function CPLSetThreadLocalConfigOptions

port/cpl_conv.cpp:2247–2259  ·  view source on GitHub ↗

* Replace the full list of thread local configuration options with the * passed list of KEY=VALUE pairs. * * This has the same effect of clearing the existing list, and setting * individually each pair with the CPLSetThreadLocalConfigOption() API. * * This does not affect options set through environment variables or with * CPLSetConfigOption(). * * The passed list is copied by the functio

Source from the content-addressed store, hash-verified

2245 *
2246 */
2247void CPLSetThreadLocalConfigOptions(const char *const *papszConfigOptions)
2248{
2249 int bMemoryError = FALSE;
2250 char **papszTLConfigOptions = reinterpret_cast<char **>(
2251 CPLGetTLSEx(CTLS_CONFIGOPTIONS, &bMemoryError));
2252 if (bMemoryError)
2253 return;
2254 CSLDestroy(papszTLConfigOptions);
2255 papszTLConfigOptions =
2256 CSLDuplicate(const_cast<char **>(papszConfigOptions));
2257 CPLSetTLSWithFreeFunc(CTLS_CONFIGOPTIONS, papszTLConfigOptions,
2258 CPLSetThreadLocalTLSFreeFunc);
2259}
2260
2261/************************************************************************/
2262/* CPLFreeConfig() */

Callers 4

SetUpMethod · 0.85
TEST_FFunction · 0.85
RefUnderlyingDatasetMethod · 0.85

Calls 3

CPLGetTLSExFunction · 0.85
CSLDuplicateFunction · 0.85
CPLSetTLSWithFreeFuncFunction · 0.85

Tested by 2

SetUpMethod · 0.68
TEST_FFunction · 0.68