diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-02-13 14:02:01 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-02-13 14:02:01 +0100 |
commit | e0ad70eea4ceb6ef04f279c80bcba68252915785 (patch) | |
tree | 11059ec1dcff63d57bd6a54537b3de0eed3fbc41 /ffi/examples | |
parent | e22e2bab6b5daff36c182bebf032906796dbef6f (diff) |
ffi: Introduce type definitions.
- Introduce sq_context_t as alias for struct sq_context *.
- Our types are opaque structs for the C world, there is no point in
calling it a struct everywhere. Also, since the struct definition
is incomplete, one can only ever point to these objects, hence we
just make the *_t types pointers.
Diffstat (limited to 'ffi/examples')
-rw-r--r-- | ffi/examples/example.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ffi/examples/example.c b/ffi/examples/example.c index a9de1856..59b48c35 100644 --- a/ffi/examples/example.c +++ b/ffi/examples/example.c @@ -16,8 +16,8 @@ main (int argc, char **argv) struct stat st; int fd; char *b; - struct sq_context *ctx; - struct sq_tpk *tpk; + sq_context_t ctx; + sq_tpk_t tpk; if (argc != 2) error (1, 0, "Usage: %s <file>", argv[0]); |