aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-12-04 11:08:31 +0000
committerWerner Koch <[email protected]>2017-12-04 11:08:31 +0000
commit0c1244a2b7e30ab0610ae70166e1b5d0219782c3 (patch)
tree138353cb937071ed0cd7e37cbb58fb38ce3eafbe /doc
parentpython: Default whence argument for Data() to SEEK_SET. (diff)
downloadgpgme-0c1244a2b7e30ab0610ae70166e1b5d0219782c3.tar.gz
gpgme-0c1244a2b7e30ab0610ae70166e1b5d0219782c3.zip
core: Also check for a failed selftest in gpgm_data_new.
* src/data.c (_gpgme_data_new): Check for failed selftest. * tests/run-support.h (make_filename): Print a message on mallooc failure. (init_gpgme_basic): New. * tests/run-identify.c (main): Call init_gpgme_basic becuase we do not need to setup a protocol. * tests/t-data.c: Define PGM and include run-support.h. (make_filename): Remove. (main): Call init_gpgme_basic. -- Note: This patch may break applications which used gpgme_data but no gpgme_new without having called the required gpgme_check_version. GPGME can be used without a protocol for example to work with the data object abstraction. Thus a call to gpgme_data_new also needs to check the result of the core selftests - including on whether gpgme_check_version has been called. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'doc')
-rw-r--r--doc/gpgme.texi7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index 8dcc86e6..3b461ba9 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -683,9 +683,10 @@ uses, this function provides a run-time check if the necessary
features are provided by the installed version of the library.
If a selftest fails, the function may still succeed. Selftest errors
-are returned later when invoking @code{gpgme_new}, so that a detailed
-error code can be returned (historically, @code{gpgme_check_version}
-does not return a detailed error code).
+are returned later when invoking @code{gpgme_new} or
+@code{gpgme-data_new}, so that a detailed error code can be returned
+(historically, @code{gpgme_check_version} does not return a detailed
+error code).
@end deftypefun