summaryrefslogtreecommitdiffstats
path: root/ffi/examples
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-02-13 14:02:01 +0100
committerJustus Winter <justus@sequoia-pgp.org>2018-02-13 14:02:01 +0100
commite0ad70eea4ceb6ef04f279c80bcba68252915785 (patch)
tree11059ec1dcff63d57bd6a54537b3de0eed3fbc41 /ffi/examples
parente22e2bab6b5daff36c182bebf032906796dbef6f (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.c4
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]);