diff options
| author | Werner Koch <[email protected]> | 2019-06-12 08:49:34 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2019-06-12 08:50:30 +0000 |
| commit | 5cfdf878fbc60328bbbc0b0c302a85dea679ad81 (patch) | |
| tree | 9c88686ca483e455907edbdff300135fa29f843d /src/ops.h | |
| parent | core: Introduce a context serial number. (diff) | |
| download | gpgme-5cfdf878fbc60328bbbc0b0c302a85dea679ad81.tar.gz gpgme-5cfdf878fbc60328bbbc0b0c302a85dea679ad81.zip | |
core: Link all context objects and add _gpgme_get_ctx.
* src/context.h (struct gpgme_context): Add field 'next_ctx'.
* src/gpgme.c (def_lc_lock): Replace by ...
(context_list_lock): new.
(context_list): New variable.
(gpgme_new): Add new context object to the list.
(gpgme_release): Remove context object from the list.
(_gpgme_get_ctx): New function.
--
To allow mapping a context serial number back to a context object and
to check whether a serialno has still a context object, we need to
link them all together. We already take a lock to setup the locale
and thus the only overhead is in freeing the context.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/ops.h')
| -rw-r--r-- | src/ops.h | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -26,9 +26,6 @@ #include "context.h" -/* From gpgme.c. */ -gpgme_error_t _gpgme_cancel_with_err (gpgme_ctx_t ctx, gpg_error_t ctx_err, - gpg_error_t op_err); /* Clear all notation data from the context. */ void _gpgme_sig_notation_clear (gpgme_ctx_t ctx); |
