aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgme.h.in
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2009-05-28 15:16:01 +0000
committerMarcus Brinkmann <[email protected]>2009-05-28 15:16:01 +0000
commitbdb7bcf93889c279c48acb0b75792ba310116074 (patch)
tree8cf57dce655b2572a08dca4ef70735c0bbedc57b /src/gpgme.h.in
parentdoc/ (diff)
downloadgpgme-bdb7bcf93889c279c48acb0b75792ba310116074.tar.gz
gpgme-bdb7bcf93889c279c48acb0b75792ba310116074.zip
doc/
2009-05-28 Marcus Brinkmann <[email protected]> * gpgme.texi (Library Version Check): Document selftest error. (Creating Contexts): Likewise. src/ 2009-05-28 Marcus Brinkmann <[email protected]> * gpgme.h.in (gpgme_check_version_internal): New prototype. (gpgme_check_version): New macro, overriding function of the same name. * libgpgme.vers, gpgme.def: Add gpgme_check_version_internal.o * context.h (_gpgme_selftest): New variable declaration. * version.c: Include "context.h". (gpgme_check_version): Set _gpgme_selftest on success. (gpgme_check_version_internal): New function. * gpgme.c (_gpgme_selftest): Define it. (gpgme_new): Check the selftest result.
Diffstat (limited to 'src/gpgme.h.in')
-rw-r--r--src/gpgme.h.in14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gpgme.h.in b/src/gpgme.h.in
index fb2b7363..a9a4a3f7 100644
--- a/src/gpgme.h.in
+++ b/src/gpgme.h.in
@@ -1894,9 +1894,21 @@ gpgme_error_t gpgme_op_conf_save (gpgme_ctx_t ctx, gpgme_conf_comp_t comp);
/* Various functions. */
-/* Check that the library fulfills the version requirement. */
+/* Check that the library fulfills the version requirement. Note:
+ This is here only for the case where a user takes a pointer from
+ the old version of this function. The new version and macro for
+ run-time checks are below. */
const char *gpgme_check_version (const char *req_version);
+/* Check that the library fulfills the version requirement and check
+ for struct layout mismatch involving bitfields. */
+const char *gpgme_check_version_internal (const char *req_version,
+ size_t offset_sig_validity);
+
+#define gpgme_check_version(req_version) \
+ gpgme_check_version_internal (req_version, \
+ offsetof (struct _gpgme_signature, validity))
+
/* Get the information about the configured and installed engines. A
pointer to the first engine in the statically allocated linked list
is returned in *INFO. If an error occurs, it is returned. The