[Pcsclite-git-commit] [PCSC] 01/01: Doxygen: better pcsc_stringify_error() documentation

Ludovic Rousseau rousseau at moszumanska.debian.org
Sun Jan 22 15:49:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository PCSC.

commit 651cf79f4b80a7c72f097e6a598b6199a753c063
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Sun Jan 22 16:47:13 2017 +0100

    Doxygen: better pcsc_stringify_error() documentation
    
    pcsc_stringify_error() uses Thread-Local Storage (TLS) for the returned
    buffer.
    
    Thanks to Maksim Ivanov
    "[Pcsclite-muscle] pcsc_stringify_error thread safety"
    https://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20170116/000788.html
---
 src/error.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/error.c b/src/error.c
index ed4567c..e7af426 100644
--- a/src/error.c
+++ b/src/error.c
@@ -60,6 +60,11 @@ PCSC_API const char* pcsc_stringify_error(const LONG pcscError)
 /**
  * @brief Returns a human readable text for the given PC/SC error code.
  *
+ * @warning
+ * The returned string uses a Thread-Local Storage (TLS) buffer and is valid:
+ * -# only while the thread on which it was obtained is alive.
+ * -# until the next call to this function on the same thread.
+ *
  * @ingroup API
  * @param[in] pcscError Error code to be translated to text.
  *

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/PCSC.git



More information about the Pcsclite-cvs-commit mailing list