gpgme: check_version() MUST be called, but examples miss it
bernhard at intevation.de
Wed Mar 5 10:20:32 CET 2008
On Wednesday 05 March 2008 08:25, Werner Koch wrote:
> On Tue, 4 Mar 2008 22:54, bernhard at intevation.de said:
> > I strongly recommend to add it to shorter examples as well as some
> > (experienced) programmers will look at the examples first and might miss
> These are example code snippets and clearly not complete applications.
> Note that even the inclusion of header files is left out.
Yes, I know and I have noticed ...
> > the requirement to use check_version().
> > It could be done using a pseudo-function like
> > MY_GPGME_INIT()
> That is not sufficient. A whole chapter describes the required
> preparations and the developer MUST read this chapter to use gpgme.
> There are even more severe pitfalls than leaving out the version check.
I believe a reminder line could be instructive for the example -
at last for the longer ones. For the IO Example which has a main() funcation,
I believe not having it in there is a serious problem.
In pyme, which was certainly done by a caring developer,
the examples all miss the version check.
Managing Director - Owner: www.intevation.net (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the Gnupg-devel