diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-02-05 12:56:43 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-02-05 17:54:20 +0100 |
commit | 59faa3eacf0a6e0379d9ff6a2f3176658f97d1e2 (patch) | |
tree | f3cccbb3524b9a77eed0d3e989357e779e839d44 /openpgp-ffi | |
parent | 12f617efc3e99d6bb2c5b36ba2547463c6031555 (diff) |
openpgp-ffi: Fix pgp_armor_header_t.
- Turn it into a pointer type aligning it with the other type
definitions.
Diffstat (limited to 'openpgp-ffi')
-rw-r--r-- | openpgp-ffi/examples/armor.c | 2 | ||||
-rw-r--r-- | openpgp-ffi/include/sequoia/openpgp.h | 6 | ||||
-rw-r--r-- | openpgp-ffi/src/armor.rs | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/openpgp-ffi/examples/armor.c b/openpgp-ffi/examples/armor.c index 00873761..42395811 100644 --- a/openpgp-ffi/examples/armor.c +++ b/openpgp-ffi/examples/armor.c @@ -24,7 +24,7 @@ main (int argc, char **argv) pgp_reader_t armor; pgp_armor_kind_t kind; char message[12]; - pgp_armor_header_t *header; + pgp_armor_header_t header; size_t header_len; bytes = pgp_reader_from_bytes ((uint8_t *) armored, strlen (armored)); diff --git a/openpgp-ffi/include/sequoia/openpgp.h b/openpgp-ffi/include/sequoia/openpgp.h index 05d43f2d..36e9c18a 100644 --- a/openpgp-ffi/include/sequoia/openpgp.h +++ b/openpgp-ffi/include/sequoia/openpgp.h @@ -262,7 +262,7 @@ typedef enum pgp_armor_kind { typedef struct pgp_armor_header { char *key; char *value; -} pgp_armor_header_t; +} *pgp_armor_header_t; /*/ @@ -308,7 +308,7 @@ pgp_armor_kind_t pgp_armor_reader_kind (pgp_reader_t reader); /// allocated with `malloc`, and the caller is responsible for freeing /// both the array and the strings. /*/ -pgp_armor_header_t *pgp_armor_reader_headers (pgp_error_t *errp, +pgp_armor_header_t pgp_armor_reader_headers (pgp_error_t *errp, pgp_reader_t reader, size_t *len); @@ -320,7 +320,7 @@ pgp_armor_header_t *pgp_armor_reader_headers (pgp_error_t *errp, /*/ pgp_writer_t pgp_armor_writer_new (pgp_error_t *errp, pgp_writer_t inner, pgp_armor_kind_t kind, - pgp_armor_header_t *header, size_t header_len); + pgp_armor_header_t header, size_t header_len); diff --git a/openpgp-ffi/src/armor.rs b/openpgp-ffi/src/armor.rs index aef262ad..3c1039c2 100644 --- a/openpgp-ffi/src/armor.rs +++ b/openpgp-ffi/src/armor.rs @@ -73,7 +73,7 @@ fn kind_to_int(kind: Option<armor::Kind>) -> c_int { /// pgp_reader_t armor = pgp_armor_reader_new (bytes, PGP_ARMOR_KIND_ANY); /// /// pgp_error_t err; -/// pgp_armor_header_t *header; +/// pgp_armor_header_t header; /// size_t header_len; /// header = pgp_armor_reader_headers (&err, armor, &header_len); /// if (header == NULL) @@ -153,7 +153,7 @@ pub extern "system" fn pgp_armor_reader_from_file(errp: Option<&mut *mut ::error /// PGP_ARMOR_KIND_ANY); /// /// pgp_error_t err; -/// pgp_armor_header_t *header; +/// pgp_armor_header_t header; /// size_t header_len; /// header = pgp_armor_reader_headers (&err, armor, &header_len); /// if (header == NULL) @@ -309,7 +309,7 @@ pub extern "system" fn pgp_armor_reader_headers(errp: Option<&mut *mut ::error:: /// pgp_error_t err; /// /// char *message = "Hello world!"; -/// pgp_armor_header_t header[2] = { +/// struct pgp_armor_header header[] = { /// { "Key0", "Value0" }, /// { "Key1", "Value1" }, /// }; |