gpgme_get_sub_protocol() returning gpgme_protocol_t instead of gpgme_error_t?

Albert Chin gnupg-devel at mlists.thewrittenword.com
Mon Mar 10 21:43:43 CET 2014


src/gpgme.c has:
  gpgme_error_t
  gpgme_get_sub_protocol (gpgme_ctx_t ctx)
  {
    TRACE2 (DEBUG_CTX, "gpgme_get_sub_protocol", ctx,
            "ctx->sub_protocol=%i (%s)", ctx->sub_protocol,
            gpgme_get_protocol_name (ctx->sub_protocol)
            ? gpgme_get_protocol_name (ctx->sub_protocol) : "invalid");

    return ctx->sub_protocol;
  }

but sub_protocol is of type:
  struct gpgme_context
  {
    ...

    /* Engine's sub protocol.  */
    gpgme_protocol_t sub_protocol;

    ...
  }

So why doesn't isn't gpgme_get_sub_protocol declared to return
gpgme_protocol_t instead?

-- 
albert chin (china at thewrittenword.com)



More information about the Gnupg-devel mailing list