GPGME: const-ifying cbs argument for gpgme_data_new_from_cbs()

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sun Jun 11 04:03:18 CEST 2017


Hey all--

i'm playing with gpgme using callbacks, and i noticed that
gpgme_data_new_from_cbs takes its cbs argument (the struct of callback
function pointers) as non-const.  is there any reason that it plans to
modify this object or is the lack of constness just an oversight?

What is the expected lifespan of the cbs callback table?  Can it be
freed (or fall off the stack) before the gpgme_data_t is released?
Should these expected constraints be documented?  I'm up for improving
the documentation if someone wants to explain the expectations here.

Regards,

      --dkg



More information about the Gnupg-devel mailing list