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

Function OGRAPISPYCPLSetThreadLocalConfigOption

ogr/ograpispy.cpp:1332–1356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1330}
1331
1332void 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

Calls 5

OGRAPISpyEnabledFunction · 0.85
OGRAPISpyFlushDeferedFunction · 0.85
OGRAPISpyGetStringFunction · 0.85
OGRAPISpyFileCloseFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected