| 1330 | } |
| 1331 | |
| 1332 | void OGRAPISPYCPLSetThreadLocalConfigOption(const char *pszKey, |
| 1333 | const char *pszValue) |
| 1334 | { |
| 1335 | if (STARTS_WITH(pszKey, "OGR_API_SPY_") || STARTS_WITH(pszKey, "__")) |
| 1336 | return; |
| 1337 | if (!OGRAPISpyEnabled()) |
| 1338 | return; |
| 1339 | OGRAPISpyFlushDefered(); |
| 1340 | if (pszValue) |
| 1341 | { |
| 1342 | fprintf(fpSpyFile, |
| 1343 | "gdal.SetConfigOption(%s, %s) # SetThreadLocalConfigOption " |
| 1344 | "actually\n", |
| 1345 | OGRAPISpyGetString(pszKey).c_str(), |
| 1346 | OGRAPISpyGetString(pszValue).c_str()); |
| 1347 | } |
| 1348 | else |
| 1349 | { |
| 1350 | fprintf(fpSpyFile, |
| 1351 | "gdal.SetConfigOption(%s, None) # SetThreadLocalConfigOption " |
| 1352 | "actually\n", |
| 1353 | OGRAPISpyGetString(pszKey).c_str()); |
| 1354 | } |
| 1355 | OGRAPISpyFileClose(); |
| 1356 | } |
| 1357 | |
| 1358 | #endif // OGRAPISPY_ENABLED |
no test coverage detected