| 56 | /************************************************************************/ |
| 57 | |
| 58 | static FindFileTLS *CPLGetFindFileTLS() |
| 59 | { |
| 60 | int bMemoryError = FALSE; |
| 61 | FindFileTLS *pTLSData = reinterpret_cast<FindFileTLS *>( |
| 62 | CPLGetTLSEx(CTLS_FINDFILE, &bMemoryError)); |
| 63 | if (bMemoryError) |
| 64 | return nullptr; |
| 65 | if (pTLSData == nullptr) |
| 66 | { |
| 67 | pTLSData = static_cast<FindFileTLS *>( |
| 68 | VSI_CALLOC_VERBOSE(1, sizeof(FindFileTLS))); |
| 69 | if (pTLSData == nullptr) |
| 70 | return nullptr; |
| 71 | CPLSetTLSWithFreeFunc(CTLS_FINDFILE, pTLSData, CPLFindFileFreeTLS); |
| 72 | } |
| 73 | return pTLSData; |
| 74 | } |
| 75 | |
| 76 | /************************************************************************/ |
| 77 | /* CPLFinderInit() */ |
no test coverage detected