TurboJPEG: Make global error handling thread-safe

... on platforms that support thread-local storage.  This currently
includes all supported platforms except 32-bit macOS.

Fixes #396
This commit is contained in:
DRC
2020-06-16 13:52:39 -05:00
parent b443c541b9
commit ae87a95861
6 changed files with 28 additions and 4 deletions

View File

@@ -1650,7 +1650,7 @@ DLLEXPORT void tjFree(unsigned char *buffer);
* @param handle a handle to a TurboJPEG compressor, decompressor, or
* transformer instance, or NULL if the error was generated by a global
* function (but note that retrieving the error message for a global function
* is not thread-safe.)
* is thread-safe only on platforms that support thread-local storage.)
*
* @return a descriptive error message explaining why the last command failed.
*/