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/debug.c | |
| 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/debug.c')
0 files changed, 0 insertions, 0 deletions
