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

Function CPLGetGlobalConfigOption

port/cpl_conv.cpp:1841–1860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1839}
1840
1841static const char *
1842CPLGetGlobalConfigOption(const char *pszKey, const char *pszDefault,
1843 bool bSubstituteNullValueMarkerWithNull)
1844{
1845
1846#ifdef DEBUG_CONFIG_OPTIONS
1847 CPLAccessConfigOption(pszKey, TRUE);
1848#endif
1849
1850 CPLMutexHolderD(&hConfigMutex);
1851
1852 const char *pszResult =
1853 CSLFetchNameValue(const_cast<char **>(g_papszConfigOptions), pszKey);
1854
1855 if (pszResult == nullptr || (bSubstituteNullValueMarkerWithNull &&
1856 strcmp(pszResult, CPL_NULL_VALUE) == 0))
1857 return pszDefault;
1858
1859 return pszResult;
1860}
1861
1862/************************************************************************/
1863/* CPLSubscribeToSetConfigOption() */

Calls 2

CPLAccessConfigOptionFunction · 0.85
CSLFetchNameValueFunction · 0.85

Tested by

no test coverage detected