diff options
author | Justus Winter <[email protected]> | 2017-02-15 08:45:46 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2017-02-15 15:34:37 +0000 |
commit | 6df6e01ed5a581765d245bf7303cda4497d0eb22 (patch) | |
tree | 91633e21cf6f6a5d4ecb63f6978c59162c66d0b9 | |
parent | python: Wrap utility functions. (diff) | |
download | gpgme-6df6e01ed5a581765d245bf7303cda4497d0eb22.tar.gz gpgme-6df6e01ed5a581765d245bf7303cda4497d0eb22.zip |
core: Fix error types.
* NEWS: Update.
* src/data.c (gpgme_data_set_flag): Return a 'gpgme_error_t'.
* src/error.c (gpgme_strerror_r): Fix type of first argument.
* src/gpgme.h.in (gpgme_strerror_r): Adapt.
(gpgme_data_set_flag): Likewise.
--
Fix for consistency. This should not pose problems, because typedef
gpg_error_t gpgme_error_t.
Signed-off-by: Justus Winter <[email protected]>
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | src/data.c | 2 | ||||
-rw-r--r-- | src/error.c | 2 | ||||
-rw-r--r-- | src/gpgme.h.in | 6 |
4 files changed, 7 insertions, 5 deletions
@@ -5,6 +5,8 @@ Noteworthy changes in version 1.8.1 (unreleased) * Interface changes relative to the 1.8.0 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + gpgme_strerror_r CHANGED: Use gpgme_error_t (compatible type). + gpgme_data_set_flag CHANGED: Return gpgme_error_t (compatible type). cpp: Context::revUid(const Key&, const char*) NEW. cpp: Context::startRevUid(const Key&, const char*) NEW. cpp: Context::addUid(const Key&, const char*) NEW. @@ -259,7 +259,7 @@ gpgme_data_get_file_name (gpgme_data_t dh) /* Set a flag for the data object DH. See the manual for details. */ -gpg_error_t +gpgme_error_t gpgme_data_set_flag (gpgme_data_t dh, const char *name, const char *value) { TRACE_BEG2 (DEBUG_DATA, "gpgme_data_set_flag", dh, diff --git a/src/error.c b/src/error.c index a84b8673..d9c5fd04 100644 --- a/src/error.c +++ b/src/error.c @@ -41,7 +41,7 @@ gpgme_strerror (gpgme_error_t err) 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) +gpgme_strerror_r (gpgme_error_t err, char *buf, size_t buflen) { return gpg_strerror_r (err, buf, buflen); } diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 67c139be..7f2d34f7 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -177,7 +177,7 @@ const char *gpgme_strerror (gpgme_error_t err); 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); +int gpgme_strerror_r (gpgme_error_t err, char *buf, size_t buflen); /* Return a pointer to a string containing a description of the error source in the error value ERR. */ @@ -1161,8 +1161,8 @@ gpgme_error_t gpgme_data_set_file_name (gpgme_data_t dh, const char *file_name); /* Set a flag for the data object DH. See the manual for details. */ -gpg_error_t gpgme_data_set_flag (gpgme_data_t dh, - const char *name, const char *value); +gpgme_error_t gpgme_data_set_flag (gpgme_data_t dh, + const char *name, const char *value); /* Try to identify the type of the data in DH. */ gpgme_data_type_t gpgme_data_identify (gpgme_data_t dh, int reserved); |