aboutsummaryrefslogtreecommitdiffstats
path: root/gpgme/gpgme.h
diff options
context:
space:
mode:
Diffstat (limited to 'gpgme/gpgme.h')
-rw-r--r--gpgme/gpgme.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h
index df9a8e7b..921d57e5 100644
--- a/gpgme/gpgme.h
+++ b/gpgme/gpgme.h
@@ -131,11 +131,14 @@ gpgme_err_source (gpgme_error_t err)
code in the error value ERR. This function is not thread safe. */
const char *gpgme_strerror (gpgme_error_t err);
-/* Return a pointer to a string containing a description of the error
- code in the error value ERR. The buffer for the string is
- allocated with malloc(), and has to be released by the user. On
- error, NULL is returned. */
-char *gpgme_strerror_r (gpgme_error_t err);
+/* Return the error string for ERR in the user-supplied buffer BUF of
+ size BUFLEN. This function is, in contrast to gpg_strerror,
+ thread-safe if a thread-safe strerror_r() function is provided by
+ the system. If the function succeeds, 0 is returned and BUF
+ contains the string describing the error. If the buffer was not
+ large enough, ERANGE is returned and BUF contains as much of the
+ beginning of the error string as fits into the buffer. */
+int gpgme_strerror_r (gpg_error_t err, char *buf, size_t buflen);
/* Return a pointer to a string containing a description of the error