gpgme: check_version() MUST be called, but examples miss it
Marcus Brinkmann
marcus.brinkmann at ruhr-uni-bochum.de
Wed Mar 5 12:43:18 CET 2008
At Tue, 4 Mar 2008 22:54:00 +0100,
Bernhard Reiter wrote:
>
> [1 <multipart/signed (7bit)>]
> [1.1 <text/plain; iso-8859-1 (quoted-printable)>]
> http://cvs.gnupg.org/cgi-bin/viewcvs.cgi/trunk/doc/gpgme.texi?rev=1298
> explains for check_version()_:
> In either case, the function initializes some
> sub-systems, and for this reason alone it must be invoked early in
> your program, before you make use of the other functions in
> @acronym{GPGME}.
>
> But the remaining examples codes in the documentation do not contain a hint
> towards it. It is a must to add it in the @node I/O Callback Example .
I added a call to init_gpgme (an earlier example, used to be
init_program) to the main program.
> I strongly recommend to add it to shorter examples as well as some
> (experienced) programmers will look at the examples first and might miss
> the requirement to use check_version().
It would be more useful to have a documented, complete example with a
step-by-step explanation and a Makefile. This could even be an
introductory chapter.
Thanks,
Marcus
More information about the Gnupg-devel
mailing list