[gnutls-dev] Re: living without global variables
Bryan Henderson
bryanh at giraffe-data.com
Tue Jan 3 02:32:40 CET 2006
>The proper way for other
>libraries to use libgcrypt is by wrapping this init function and to
>allow the caller to actually initialize Libgcrypt (hidden in a
>wrapper function).
>
>Unfortunately gnutls does not do this.
Doesn't it? gnutls' global init function does _something_ with
Libgcrypt. How is that different?
>In fact Libgcrypt should never be unloaded but kept in memory for the
>lifetime of the process.
I'm sure you have reasons for this belief, which is essentially that
modularity is not appropriate where Libgcrypt is involved, but it would
be nice if a user had a choice over this policy.
>the only way to make
>Libgcrypt thread safe is by delegating the initialization to the
>actual application - only the application knows what threading model
>it is going to use.
Assuming you have to have global variables, of course.
--
Bryan Henderson Phone 408-621-2000
San Jose, California
More information about the Gnutls-dev
mailing list