| 1839 | } |
| 1840 | |
| 1841 | static const char * |
| 1842 | CPLGetGlobalConfigOption(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() */ |
no test coverage detected