[PATCH] gpgme trust item ref counting.

Marcus Brinkmann Marcus.Brinkmann at ruhr-uni-bochum.de
Mon Feb 3 11:50:01 CET 2003

On Mon, Feb 03, 2003 at 01:00:01AM +0100, Marc Mutz wrote:
> Of course it's not necessary. But why should every user of trust items 
> reimplement ref counting anew if it's only a few lines of code in 
> gpgme?
> What was it the ME in gpgme stood for? Oh, yes: "Made Easy".
> Did you change that recently? ;-))

There is a fine line between making things easy and introducing arbitrary
interfaces that try to anticipate the needs of the user.  For example, there
is currently no way to hook a pointer into a context that has a user defined
meaning, although it is potentially useful.  Another user might not want to
do reference counting, but rather use a garbage collector.  Yet somebody
else needs not only hard references, but also soft references (which don't
prevent the object from being deallocated).

If you store trust items in a broader scope than the one where you got them,
you have to put them into some data structure.  This data structure can also
include the reference counting with hardly any extra work, if a reference
counting is really necessary.

It might even be that the current key cache will go in 0.4, as there is
currently little use to it.  I have yet to think that through, though.

And btw, the trustitem interface is experimental, too.  As far as I know,
Werner is not really happy about it.


`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    marcus at gnu.org
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann at ruhr-uni-bochum.de

More information about the Gnupg-devel mailing list