aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2016-12-07 20:41:34 +0000
committerAndre Heinecke <[email protected]>2016-12-07 20:46:24 +0000
commit7880335273382f05cbbe38aa965a566c4127ba6a (patch)
tree920374b7c36d348a544e104f258b6d0b35f06043
parentpython: Try to be more helpful when given a string to encrypt(). (diff)
downloadgpgme-7880335273382f05cbbe38aa965a566c4127ba6a.tar.gz
gpgme-7880335273382f05cbbe38aa965a566c4127ba6a.zip
Clarify what "checking on bit" means
* doc/gpgme.texi (gpgme_sigsum_t summary): Clarify what "you can check one bit means" -- It was unclear which bit to test for is. And tests with students have shown that they would "test" for this one bit by using if(sig.summary == GPGME_SIGSUM_VALID) which would fail because valid sigs are also SIGSUM_GREEN. So lets give an example for people not used to checking bits and clarify through this example which bit is meant to be checked.
-rw-r--r--doc/gpgme.texi14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index 32e08618..ee82b273 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -4948,7 +4948,19 @@ list, or @code{NULL} if this is the last element.
This is a bit vector giving a summary of the signature status. It
provides an easy interface to a defined semantic of the signature
status. Checking just one bit is sufficient to see whether a
-signature is valid without any restrictions.
+signature is valid without any restrictions. This means that
+you can check for GPGME_SIGSUM_VALID like this:
+
+@example
+if (sig.summary & GPGME_SIGSUM_VALID)
+@{
+ ..do stuff if valid..
+@}
+else
+@{
+ ..do stuff if not fully valid..
+@}
+@end example
The defined bits are:
@table @code