diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-10-28 16:08:55 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-10-28 16:08:55 +0100 |
commit | 134e03ea2cbc9dc8772593c283f537c53f09fbbe (patch) | |
tree | bc8d632aca086d3da627076f0e2f9467fc745e48 /openpgp-ffi/include/sequoia/openpgp/types.h | |
parent | 2ae586d68eb8e01435ae5449473b46e19cc06e18 (diff) |
openpgp-ffi: Fix returning pgp_tag_t.
- Force pgp_tag_t to have a defined size, and return integers of
that size from the ffi glue.
- This problem did only manifest itself when compiling with
opt-level=1.
Diffstat (limited to 'openpgp-ffi/include/sequoia/openpgp/types.h')
-rw-r--r-- | openpgp-ffi/include/sequoia/openpgp/types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openpgp-ffi/include/sequoia/openpgp/types.h b/openpgp-ffi/include/sequoia/openpgp/types.h index d1612a73..d7a8271e 100644 --- a/openpgp-ffi/include/sequoia/openpgp/types.h +++ b/openpgp-ffi/include/sequoia/openpgp/types.h @@ -286,6 +286,10 @@ typedef enum pgp_tag { PGP_TAG_PRIVATE1 = 61, PGP_TAG_PRIVATE2 = 62, PGP_TAG_PRIVATE3 = 63, + + /* Dummy value to make sure the enumeration has a defined size. + Do not use this value. */ + PGP_TAG_FORCE_WIDTH = INT_MAX, } pgp_tag_t; /*/ |