gpgme: check_version() MUST be called, but examples miss it

Werner Koch wk at gnupg.org
Wed Mar 5 08:25:02 CET 2008


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.

> 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.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.




More information about the Gnupg-devel mailing list