gpgme -- How should gpgme_release be used?
Jose Carlos Garcia Sogo
jose at jaimedelamo.eu.org
Sat May 5 11:15:01 CEST 2001
El 04 May 2001 18:03:36 -0400, andres at corrada.com escribió:
> Hello,
>
> I'm wrapping gpgme with some Python classes and I have created a "Context"
> class to shadow the GpgmeCtx data structure.
>
> I can initialize a new context easily with gpgme_new, but when I call
> gpgme_release immediately on the same context I get this error:
>
> python: key.c:130: gpgme_key_release: Assertion key->ref_count' failed.
I'm also using gpgme (not in python but directly in C) and I think
this should work. You create a new gpgmectx and later you free it...
this should work.
> Is there some further initialization I need to do on a context before I can
> safely release it? Do I understand properly the use of gpgme_release?
As fas as I know there isn't any more needed initialization in
gpgmectx. That's why calling gpgme_release just after gpgme_new should
work.
BTW: right now I'm working with a slightly modified version of gpgme (I
have only modified verify.c, encrypt.c and decrypt..c files, so this
shouldn't affect your problem). I have sent the patch to Werner, but he
hasn't replied me. I have modifyed these functions because it was not
possible to call sequentially two or more of these functions using the
same context.
--
José Carlos García Sogo Seahorse(-bonobo) developer
jose jaimedelamo eu org http://seahorse.sourceforge.net
Key-Id: 0x90788E11
Fingerprint = B06B 023F EAA6 37DC 1E62 B079 4BE0 5825 9078 8E11
More information about the Gnupg-devel
mailing list