aboutsummaryrefslogtreecommitdiffstats
path: root/src/context.h
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2009-06-18 12:38:55 +0000
committerMarcus Brinkmann <[email protected]>2009-06-18 12:38:55 +0000
commit3ab899f41cda31ab763da9e73e95981dcf3d5b7f (patch)
tree369e57cd17d364b54ced5a89dc813b6bddac6823 /src/context.h
parent2009-06-16 Marcus Brinkmann <[email protected]> (diff)
downloadgpgme-3ab899f41cda31ab763da9e73e95981dcf3d5b7f.tar.gz
gpgme-3ab899f41cda31ab763da9e73e95981dcf3d5b7f.zip
2009-06-18 Marcus Brinkmann <[email protected]>
* context.h (CTX_OP_DATA_MAGIC): New macro. (struct ctx_op_data): New member MAGIC. * op-support.c (_gpgme_op_data_lookup): Initialize magic. * gpgme.c (gpgme_result_unref, gpgme_result_ref): Check magic.
Diffstat (limited to 'src/context.h')
-rw-r--r--src/context.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/context.h b/src/context.h
index 63af1d10..e98e7bea 100644
--- a/src/context.h
+++ b/src/context.h
@@ -42,8 +42,14 @@ typedef enum
} ctx_op_data_id_t;
+/* "gpgmeres" in ASCII. */
+#define CTX_OP_DATA_MAGIC 0x736572656d677067ULL
struct ctx_op_data
{
+ /* A magic word just to make sure people don't deallocate something
+ that ain't a result structure. */
+ unsigned long long magic;
+
/* The next element in the linked list, or NULL if this is the last
element. Used by op data structures linked into a context. */
struct ctx_op_data *next;