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

@@ -2129,7 +2129,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
<p>Returns a descriptive error message explaining why the last command failed. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">handle</td><td>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.)</td></tr>
<tr><td class="paramname">handle</td><td>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 thread-safe only on platforms that support thread-local storage.)</td></tr>
</table>
</dd>
</dl>