[git] GPGME - branch, master, updated. gpgme-1.6.0-375-gbd24db3

by Werner Koch cvs at cvs.gnupg.org
Fri Sep 16 16:04:02 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  bd24db313d860ae46d37776dcf1067455d1b9880 (commit)
       via  b615316168f4d33311909d4056b236d13c69488f (commit)
       via  3d6340e8c59ee11a95e03fb213ad9b228be47833 (commit)
      from  6af7bee076bacbc0cdfe7de342bce43ca5671b3b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bd24db313d860ae46d37776dcf1067455d1b9880
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Sep 16 15:59:54 2016 +0200

    cpp: Silence use of deprecated function warning.
    
    * lang/cpp/src/context.cpp (GpgME): Use pragma to silence wardning.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp
index 564cff5..1e134a0 100644
--- a/lang/cpp/src/context.cpp
+++ b/lang/cpp/src/context.cpp
@@ -693,6 +693,10 @@ Error Context::startPasswd(const Key &key)
     return Error(d->lasterr = gpgme_op_passwd_start(d->ctx, key.impl(), 0U));
 }
 
+
+#pragma GCC push_diagnostics
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 Error Context::edit(const Key &key, std::unique_ptr<EditInteractor> func, Data &data)
 {
     d->lastop = Private::Edit;
@@ -704,6 +708,7 @@ Error Context::edit(const Key &key, std::unique_ptr<EditInteractor> func, Data &
                                             dp ? dp->data : 0));
 }
 
+
 Error Context::startEditing(const Key &key, std::unique_ptr<EditInteractor> func, Data &data)
 {
     d->lastop = Private::Edit;
@@ -715,6 +720,7 @@ Error Context::startEditing(const Key &key, std::unique_ptr<EditInteractor> func
                               dp ? dp->data : 0));
 }
 
+
 EditInteractor *Context::lastEditInteractor() const
 {
     return d->lastEditInteractor.get();
@@ -725,6 +731,7 @@ std::unique_ptr<EditInteractor> Context::takeLastEditInteractor()
     return std::move(d->lastEditInteractor);
 }
 
+
 Error Context::cardEdit(const Key &key, std::unique_ptr<EditInteractor> func, Data &data)
 {
     d->lastop = Private::CardEdit;
@@ -747,6 +754,8 @@ Error Context::startCardEditing(const Key &key, std::unique_ptr<EditInteractor>
                               dp ? dp->data : 0));
 }
 
+#pragma GCC pop_diagnostics
+
 EditInteractor *Context::lastCardEditInteractor() const
 {
     return d->lastCardEditInteractor.get();

commit b615316168f4d33311909d4056b236d13c69488f
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Sep 16 15:59:07 2016 +0200

    core: Document the version a function has been deprecated.
    
    * src/gpgme.h.in (_GPGME_DEPRECATED): Change to take versio numbers
    for documentation.  Change all places.
    (_GPGME_DEPRECATED_OUTSIDE_GPGME): Ditto.
    * lang/python/gpgme-h-clean.py: Adjust RE.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/lang/python/gpgme-h-clean.py b/lang/python/gpgme-h-clean.py
index 0ec7ab5..52f8676 100755
--- a/lang/python/gpgme-h-clean.py
+++ b/lang/python/gpgme-h-clean.py
@@ -27,7 +27,7 @@ if len(sys.argv) != 2:
     sys.exit(1)
 
 deprec_func = re.compile(r'^(.*typedef.*|.*\(.*\)|[^#]+\s+.+)'
-                         + r'\s*_GPGME_DEPRECATED(_OUTSIDE_GPGME)?;\s*',
+                         + r'\s*_GPGME_DEPRECATED(_OUTSIDE_GPGME)?\(.*\);\s*',
                          re.S)
 line_break = re.compile(';|\\$|\\x0c|^\s*#|{');
 
diff --git a/src/gpgme.h.in b/src/gpgme.h.in
index b28a643..548d360 100644
--- a/src/gpgme.h.in
+++ b/src/gpgme.h.in
@@ -67,29 +67,31 @@ extern "C" {
 #endif
 
 
+/* The deprecated macro takes the version number of GPGME which
+ * introduced the deprecation as parameter for documentation.  */
 #ifdef GPGRT_ATTR_DEPRECATED
-# define _GPGME_DEPRECATED GPGRT_ATTR_DEPRECATED
+# define _GPGME_DEPRECATED(a,b) GPGRT_ATTR_DEPRECATED
 #elif defined(__GNUC__)
 # define _GPGME_GCC_VERSION (__GNUC__ * 10000 \
                              + __GNUC_MINOR__ * 100 \
                              + __GNUC_PATCHLEVEL__)
 
 # if _GPGME_GCC_VERSION > 30100
-#  define _GPGME_DEPRECATED  __attribute__ ((__deprecated__))
+#  define _GPGME_DEPRECATED(a,b)  __attribute__ ((__deprecated__))
 # else
-#  define _GPGME_DEPRECATED
+#  define _GPGME_DEPRECATED(a,b)
 # endif
 #else
-# define _GPGME_DEPRECATED
+# define _GPGME_DEPRECATED(a,b)
 #endif
 
 
 /* The macro _GPGME_DEPRECATED_OUTSIDE_GPGME suppresses warnings for
    fields we must access in GPGME for ABI compatibility.  */
 #ifdef _GPGME_IN_GPGME
-#define _GPGME_DEPRECATED_OUTSIDE_GPGME
+#define _GPGME_DEPRECATED_OUTSIDE_GPGME(a,b)
 #else
-#define _GPGME_DEPRECATED_OUTSIDE_GPGME _GPGME_DEPRECATED
+#define _GPGME_DEPRECATED_OUTSIDE_GPGME(a,b) _GPGME_DEPRECATED(a,b)
 #endif
 
 
@@ -307,7 +309,7 @@ typedef enum
     GPGME_SIG_STAT_GOOD_EXPKEY = 8
   }
 _gpgme_sig_stat_t;
-typedef _gpgme_sig_stat_t gpgme_sig_stat_t _GPGME_DEPRECATED;
+typedef _gpgme_sig_stat_t gpgme_sig_stat_t _GPGME_DEPRECATED(0,4);
 
 
 /* The available signature modes.  */
@@ -358,7 +360,7 @@ typedef enum
     GPGME_ATTR_SIG_CLASS    = 32
   }
 _gpgme_attr_t;
-typedef _gpgme_attr_t gpgme_attr_t _GPGME_DEPRECATED;
+typedef _gpgme_attr_t gpgme_attr_t _GPGME_DEPRECATED(0,4);
 
 
 /* The available validities for a trust item or key.  */
@@ -777,10 +779,10 @@ struct _gpgme_key_sig
   gpgme_error_t status;
 
 #ifdef __cplusplus
-  unsigned int _obsolete_class _GPGME_DEPRECATED;
+  unsigned int _obsolete_class _GPGME_DEPRECATED(0,4);
 #else
   /* Must be set to SIG_CLASS below.  */
-  unsigned int class _GPGME_DEPRECATED_OUTSIDE_GPGME;
+  unsigned int class _GPGME_DEPRECATED_OUTSIDE_GPGME(0,4);
 #endif
 
   /* The user ID string.  */
@@ -1124,7 +1126,7 @@ gpgme_key_t gpgme_signers_enum (const gpgme_ctx_t ctx, int seq);
    Deprecated, use verify result directly.  */
 const char *gpgme_get_sig_status (gpgme_ctx_t ctx, int idx,
                                   _gpgme_sig_stat_t *r_stat,
-				  time_t *r_created) _GPGME_DEPRECATED;
+				  time_t *r_created) _GPGME_DEPRECATED(0,4);
 
 /* Retrieve certain attributes of a signature.  IDX is the index
    number of the signature after a successful verify operation.  WHAT
@@ -1132,16 +1134,16 @@ const char *gpgme_get_sig_status (gpgme_ctx_t ctx, int idx,
    one.  WHATIDX is to be passed as 0 for most attributes . */
 unsigned long gpgme_get_sig_ulong_attr (gpgme_ctx_t c, int idx,
                                         _gpgme_attr_t what, int whatidx)
-     _GPGME_DEPRECATED;
+     _GPGME_DEPRECATED(0,4);
 const char *gpgme_get_sig_string_attr (gpgme_ctx_t c, int idx,
 				       _gpgme_attr_t what, int whatidx)
-     _GPGME_DEPRECATED;
+     _GPGME_DEPRECATED(0,4);
 
 
 /* Get the key used to create signature IDX in CTX and return it in
    R_KEY.  */
 gpgme_error_t gpgme_get_sig_key (gpgme_ctx_t ctx, int idx, gpgme_key_t *r_key)
-     _GPGME_DEPRECATED;
+     _GPGME_DEPRECATED(0,4);
 
 
 /* Clear all notation data from the context.  */
@@ -1356,7 +1358,7 @@ gpgme_error_t gpgme_data_new_with_read_cb (gpgme_data_t *r_dh,
 					   int (*read_cb) (void*,char *,
 							   size_t,size_t*),
 					   void *read_cb_value)
-     _GPGME_DEPRECATED;
+     _GPGME_DEPRECATED(0,4);
 
 /* Create a new data buffer filled with the content of file FNAME.
    COPY must be non-zero.  For delayed read, please use
@@ -1374,7 +1376,7 @@ gpgme_error_t gpgme_data_new_from_filepart (gpgme_data_t *r_dh,
 
 /* Reset the read pointer in DH.  Deprecated, please use
    gpgme_data_seek instead.  */
-gpgme_error_t gpgme_data_rewind (gpgme_data_t dh) _GPGME_DEPRECATED;
+gpgme_error_t gpgme_data_rewind (gpgme_data_t dh) _GPGME_DEPRECATED(0,4);
 
 
 

@@ -1404,7 +1406,7 @@ void gpgme_key_release (gpgme_key_t key);
    key structure directly instead. */
 const char *gpgme_key_get_string_attr (gpgme_key_t key, _gpgme_attr_t what,
 				       const void *reserved, int idx)
-     _GPGME_DEPRECATED;
+     _GPGME_DEPRECATED(0,4);
 
 /* Return the value of the attribute WHAT of KEY, which has to be
    representable by an unsigned integer.  IDX specifies the sub key or
@@ -1412,7 +1414,7 @@ const char *gpgme_key_get_string_attr (gpgme_key_t key, _gpgme_attr_t what,
    Deprecated, use key structure directly instead.  */
 unsigned long gpgme_key_get_ulong_attr (gpgme_key_t key, _gpgme_attr_t what,
 					const void *reserved, int idx)
-     _GPGME_DEPRECATED;
+     _GPGME_DEPRECATED(0,4);
 
 /* Return the value of the attribute WHAT of a signature on user ID
    UID_IDX in KEY, which has to be representable by a string.  IDX
@@ -1421,7 +1423,7 @@ unsigned long gpgme_key_get_ulong_attr (gpgme_key_t key, _gpgme_attr_t what,
 const char *gpgme_key_sig_get_string_attr (gpgme_key_t key, int uid_idx,
 					   _gpgme_attr_t what,
 					   const void *reserved, int idx)
-     _GPGME_DEPRECATED;
+     _GPGME_DEPRECATED(0,4);
 
 /* Return the value of the attribute WHAT of a signature on user ID
    UID_IDX in KEY, which has to be representable by an unsigned
@@ -1430,7 +1432,7 @@ const char *gpgme_key_sig_get_string_attr (gpgme_key_t key, int uid_idx,
 unsigned long gpgme_key_sig_get_ulong_attr (gpgme_key_t key, int uid_idx,
 					    _gpgme_attr_t what,
 					    const void *reserved, int idx)
-     _GPGME_DEPRECATED;
+     _GPGME_DEPRECATED(0,4);
 
 
 

@@ -1572,7 +1574,7 @@ struct _gpgme_new_signature
   unsigned int _obsolete_class_2;
 #else
   /* Must be set to SIG_CLASS below.  */
-  unsigned int class _GPGME_DEPRECATED_OUTSIDE_GPGME;
+  unsigned int class _GPGME_DEPRECATED_OUTSIDE_GPGME(0,4);
 #endif
 
   /* Crypto backend specific signature class.  */
@@ -1783,7 +1785,7 @@ gpgme_import_result_t gpgme_op_import_result (gpgme_ctx_t ctx);
 gpgme_error_t gpgme_op_import_start (gpgme_ctx_t ctx, gpgme_data_t keydata);
 gpgme_error_t gpgme_op_import (gpgme_ctx_t ctx, gpgme_data_t keydata);
 gpgme_error_t gpgme_op_import_ext (gpgme_ctx_t ctx, gpgme_data_t keydata,
-				   int *nr) _GPGME_DEPRECATED;
+				   int *nr) _GPGME_DEPRECATED(0,4);
 
 /* Import the keys from the array KEYS into the keyring.  */
 gpgme_error_t gpgme_op_import_keys_start (gpgme_ctx_t ctx, gpgme_key_t keys[]);
@@ -1976,16 +1978,18 @@ gpgme_error_t gpgme_op_interact (gpgme_ctx_t ctx, gpgme_key_t key,
 
 gpgme_error_t gpgme_op_edit_start (gpgme_ctx_t ctx, gpgme_key_t key,
 				   gpgme_edit_cb_t fnc, void *fnc_value,
-				   gpgme_data_t out) _GPGME_DEPRECATED;
-gpgme_error_t gpgme_op_edit (gpgme_ctx_t ctx, gpgme_key_t key,
-			     gpgme_edit_cb_t fnc, void *fnc_value,
-			     gpgme_data_t out) _GPGME_DEPRECATED;
+				   gpgme_data_t out) _GPGME_DEPRECATED(1,7);
+gpgme_error_t gpgme_op_edit       (gpgme_ctx_t ctx, gpgme_key_t key,
+			           gpgme_edit_cb_t fnc, void *fnc_value,
+			           gpgme_data_t out) _GPGME_DEPRECATED(1,7);
 gpgme_error_t gpgme_op_card_edit_start (gpgme_ctx_t ctx, gpgme_key_t key,
 					gpgme_edit_cb_t fnc, void *fnc_value,
-					gpgme_data_t out) _GPGME_DEPRECATED;
-gpgme_error_t gpgme_op_card_edit (gpgme_ctx_t ctx, gpgme_key_t key,
-				  gpgme_edit_cb_t fnc, void *fnc_value,
-				  gpgme_data_t out) _GPGME_DEPRECATED;
+					gpgme_data_t out)
+                                        _GPGME_DEPRECATED(1,7);
+gpgme_error_t gpgme_op_card_edit       (gpgme_ctx_t ctx, gpgme_key_t key,
+				        gpgme_edit_cb_t fnc, void *fnc_value,
+				        gpgme_data_t out)
+                                        _GPGME_DEPRECATED(1,7);
 
 
 /* Set the Tofu policy of KEY to POLCIY.  */
@@ -2098,7 +2102,7 @@ void gpgme_trust_item_unref (gpgme_trust_item_t item);
 
 /* Release the trust item ITEM.  Deprecated, use
    gpgme_trust_item_unref.  */
-void gpgme_trust_item_release (gpgme_trust_item_t item) _GPGME_DEPRECATED;
+void gpgme_trust_item_release (gpgme_trust_item_t item) _GPGME_DEPRECATED(0,4);
 
 /* Return the value of the attribute WHAT of ITEM, which has to be
    representable by a string.  Deprecated, use trust item structure
@@ -2106,7 +2110,7 @@ void gpgme_trust_item_release (gpgme_trust_item_t item) _GPGME_DEPRECATED;
 const char *gpgme_trust_item_get_string_attr (gpgme_trust_item_t item,
 					      _gpgme_attr_t what,
 					      const void *reserved, int idx)
-     _GPGME_DEPRECATED;
+     _GPGME_DEPRECATED(0,4);
 
 /* Return the value of the attribute WHAT of KEY, which has to be
    representable by an integer.  IDX specifies a running index if the
@@ -2114,7 +2118,7 @@ const char *gpgme_trust_item_get_string_attr (gpgme_trust_item_t item,
    item structure directly.  */
 int gpgme_trust_item_get_int_attr (gpgme_trust_item_t item, _gpgme_attr_t what,
 				   const void *reserved, int idx)
-     _GPGME_DEPRECATED;
+     _GPGME_DEPRECATED(0,4);
 
 
 

@@ -2197,14 +2201,14 @@ struct _gpgme_op_assuan_result
 {
   /* Deprecated.  Use the second value in a DONE event or the
      synchronous variant gpgme_op_assuan_transact_ext.  */
-  gpgme_error_t err _GPGME_DEPRECATED_OUTSIDE_GPGME;
+  gpgme_error_t err _GPGME_DEPRECATED_OUTSIDE_GPGME(1,2);
 };
 typedef struct _gpgme_op_assuan_result *gpgme_assuan_result_t;
 
 
 /* Return the result of the last Assuan command. */
 gpgme_assuan_result_t gpgme_op_assuan_result (gpgme_ctx_t ctx)
-  _GPGME_DEPRECATED;
+  _GPGME_DEPRECATED(1,2);
 
 gpgme_error_t
 gpgme_op_assuan_transact (gpgme_ctx_t ctx,
@@ -2214,7 +2218,7 @@ gpgme_op_assuan_transact (gpgme_ctx_t ctx,
 			      gpgme_assuan_inquire_cb_t inq_cb,
 			      void *inq_cb_value,
 			      gpgme_assuan_status_cb_t status_cb,
-			      void *status_cb_value) _GPGME_DEPRECATED;
+                          void *status_cb_value) _GPGME_DEPRECATED(1,2);
 
 

 /*
@@ -2472,44 +2476,44 @@ const char *gpgme_hash_algo_name (gpgme_hash_algo_t algo);
 /*
  * Deprecated types.
  */
-typedef gpgme_ctx_t GpgmeCtx _GPGME_DEPRECATED;
-typedef gpgme_data_t GpgmeData _GPGME_DEPRECATED;
-typedef gpgme_error_t GpgmeError _GPGME_DEPRECATED;
-typedef gpgme_data_encoding_t GpgmeDataEncoding _GPGME_DEPRECATED;
-typedef gpgme_pubkey_algo_t GpgmePubKeyAlgo _GPGME_DEPRECATED;
-typedef gpgme_hash_algo_t GpgmeHashAlgo _GPGME_DEPRECATED;
-typedef gpgme_sig_stat_t GpgmeSigStat _GPGME_DEPRECATED;
-typedef gpgme_sig_mode_t GpgmeSigMode _GPGME_DEPRECATED;
-typedef gpgme_attr_t GpgmeAttr _GPGME_DEPRECATED;
-typedef gpgme_validity_t GpgmeValidity _GPGME_DEPRECATED;
-typedef gpgme_protocol_t GpgmeProtocol _GPGME_DEPRECATED;
-typedef gpgme_engine_info_t GpgmeEngineInfo _GPGME_DEPRECATED;
-typedef gpgme_subkey_t GpgmeSubkey _GPGME_DEPRECATED;
-typedef gpgme_key_sig_t GpgmeKeySig _GPGME_DEPRECATED;
-typedef gpgme_user_id_t GpgmeUserID _GPGME_DEPRECATED;
-typedef gpgme_key_t GpgmeKey _GPGME_DEPRECATED;
-typedef gpgme_passphrase_cb_t GpgmePassphraseCb _GPGME_DEPRECATED;
-typedef gpgme_progress_cb_t GpgmeProgressCb _GPGME_DEPRECATED;
-typedef gpgme_io_cb_t GpgmeIOCb _GPGME_DEPRECATED;
-typedef gpgme_register_io_cb_t GpgmeRegisterIOCb _GPGME_DEPRECATED;
-typedef gpgme_remove_io_cb_t GpgmeRemoveIOCb _GPGME_DEPRECATED;
-typedef gpgme_event_io_t GpgmeEventIO _GPGME_DEPRECATED;
-typedef gpgme_event_io_cb_t GpgmeEventIOCb _GPGME_DEPRECATED;
+typedef gpgme_ctx_t GpgmeCtx _GPGME_DEPRECATED(0,4);
+typedef gpgme_data_t GpgmeData _GPGME_DEPRECATED(0,4);
+typedef gpgme_error_t GpgmeError _GPGME_DEPRECATED(0,4);
+typedef gpgme_data_encoding_t GpgmeDataEncoding _GPGME_DEPRECATED(0,4);
+typedef gpgme_pubkey_algo_t GpgmePubKeyAlgo _GPGME_DEPRECATED(0,4);
+typedef gpgme_hash_algo_t GpgmeHashAlgo _GPGME_DEPRECATED(0,4);
+typedef gpgme_sig_stat_t GpgmeSigStat _GPGME_DEPRECATED(0,4);
+typedef gpgme_sig_mode_t GpgmeSigMode _GPGME_DEPRECATED(0,4);
+typedef gpgme_attr_t GpgmeAttr _GPGME_DEPRECATED(0,4);
+typedef gpgme_validity_t GpgmeValidity _GPGME_DEPRECATED(0,4);
+typedef gpgme_protocol_t GpgmeProtocol _GPGME_DEPRECATED(0,4);
+typedef gpgme_engine_info_t GpgmeEngineInfo _GPGME_DEPRECATED(0,4);
+typedef gpgme_subkey_t GpgmeSubkey _GPGME_DEPRECATED(0,4);
+typedef gpgme_key_sig_t GpgmeKeySig _GPGME_DEPRECATED(0,4);
+typedef gpgme_user_id_t GpgmeUserID _GPGME_DEPRECATED(0,4);
+typedef gpgme_key_t GpgmeKey _GPGME_DEPRECATED(0,4);
+typedef gpgme_passphrase_cb_t GpgmePassphraseCb _GPGME_DEPRECATED(0,4);
+typedef gpgme_progress_cb_t GpgmeProgressCb _GPGME_DEPRECATED(0,4);
+typedef gpgme_io_cb_t GpgmeIOCb _GPGME_DEPRECATED(0,4);
+typedef gpgme_register_io_cb_t GpgmeRegisterIOCb _GPGME_DEPRECATED(0,4);
+typedef gpgme_remove_io_cb_t GpgmeRemoveIOCb _GPGME_DEPRECATED(0,4);
+typedef gpgme_event_io_t GpgmeEventIO _GPGME_DEPRECATED(0,4);
+typedef gpgme_event_io_cb_t GpgmeEventIOCb _GPGME_DEPRECATED(0,4);
 #define GpgmeIOCbs gpgme_io_cbs
-typedef gpgme_data_read_cb_t GpgmeDataReadCb _GPGME_DEPRECATED;
-typedef gpgme_data_write_cb_t GpgmeDataWriteCb _GPGME_DEPRECATED;
-typedef gpgme_data_seek_cb_t GpgmeDataSeekCb _GPGME_DEPRECATED;
-typedef gpgme_data_release_cb_t GpgmeDataReleaseCb _GPGME_DEPRECATED;
+typedef gpgme_data_read_cb_t GpgmeDataReadCb _GPGME_DEPRECATED(0,4);
+typedef gpgme_data_write_cb_t GpgmeDataWriteCb _GPGME_DEPRECATED(0,4);
+typedef gpgme_data_seek_cb_t GpgmeDataSeekCb _GPGME_DEPRECATED(0,4);
+typedef gpgme_data_release_cb_t GpgmeDataReleaseCb _GPGME_DEPRECATED(0,4);
 #define GpgmeDataCbs gpgme_data_cbs
-typedef gpgme_encrypt_result_t GpgmeEncryptResult _GPGME_DEPRECATED;
-typedef gpgme_sig_notation_t GpgmeSigNotation _GPGME_DEPRECATED;
-typedef	gpgme_signature_t GpgmeSignature _GPGME_DEPRECATED;
-typedef gpgme_verify_result_t GpgmeVerifyResult _GPGME_DEPRECATED;
-typedef gpgme_import_status_t GpgmeImportStatus _GPGME_DEPRECATED;
-typedef gpgme_import_result_t GpgmeImportResult _GPGME_DEPRECATED;
-typedef gpgme_genkey_result_t GpgmeGenKeyResult _GPGME_DEPRECATED;
-typedef	gpgme_trust_item_t GpgmeTrustItem _GPGME_DEPRECATED;
-typedef gpgme_status_code_t GpgmeStatusCode _GPGME_DEPRECATED;
+typedef gpgme_encrypt_result_t GpgmeEncryptResult _GPGME_DEPRECATED(0,4);
+typedef gpgme_sig_notation_t GpgmeSigNotation _GPGME_DEPRECATED(0,4);
+typedef	gpgme_signature_t GpgmeSignature _GPGME_DEPRECATED(0,4);
+typedef gpgme_verify_result_t GpgmeVerifyResult _GPGME_DEPRECATED(0,4);
+typedef gpgme_import_status_t GpgmeImportStatus _GPGME_DEPRECATED(0,4);
+typedef gpgme_import_result_t GpgmeImportResult _GPGME_DEPRECATED(0,4);
+typedef gpgme_genkey_result_t GpgmeGenKeyResult _GPGME_DEPRECATED(0,4);
+typedef	gpgme_trust_item_t GpgmeTrustItem _GPGME_DEPRECATED(0,4);
+typedef gpgme_status_code_t GpgmeStatusCode _GPGME_DEPRECATED(0,4);
 
 #ifdef __cplusplus
 }

commit 3d6340e8c59ee11a95e03fb213ad9b228be47833
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Sep 16 15:06:26 2016 +0200

    core: Map GPGME_STATUS_EOF to the empty string.
    
    * src/status-table.c (_gpgme_status_to_string): Return "" for EOF.
    * src/engine-gpg.c (read_status): Ditto.  The old code accidently used
    GPGME_STATUS_EOF which is the integer 0 and neiteyr NULL nor a string.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index dc5a140..18fb6d5 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -4464,12 +4464,13 @@ could not be started.
 @tindex gpgme_interact_cb_t
 The @code{gpgme_interact_cb_t} type is the type of functions which
 @acronym{GPGME} calls if it a key interact operation is on-going.  The
-status keyword @var{status} and the argument line @var{args} are passed
-through by @acronym{GPGME} from the crypto engine.  The file
-descriptor @var{fd} is -1 for normal status messages.  If @var{status}
-indicates a command rather than a status message, the response to the
-command should be written to @var{fd}.  The @var{handle} is provided
-by the user at start of operation.
+status keyword @var{status} and the argument line @var{args} are
+passed through by @acronym{GPGME} from the crypto engine.  An empty
+string represents EOF.  The file descriptor @var{fd} is -1 for normal
+status messages.  If @var{status} indicates a command rather than a
+status message, the response to the command should be written to
+ at var{fd}.  The @var{handle} is provided by the user at start of
+operation.
 
 The function should return @code{GPG_ERR_FALSE} if it did not handle
 the status code, @code{0} for success, or any other error value.
diff --git a/src/engine-gpg.c b/src/engine-gpg.c
index a7431d5..025657a 100644
--- a/src/engine-gpg.c
+++ b/src/engine-gpg.c
@@ -1095,8 +1095,7 @@ read_status (engine_gpg_t gpg)
       err = 0;
       gpg->status.eof = 1;
       if (gpg->status.mon_cb)
-        err = gpg->status.mon_cb (gpg->status.mon_cb_value,
-                                  GPGME_STATUS_EOF, "");
+        err = gpg->status.mon_cb (gpg->status.mon_cb_value, "", "");
       if (gpg->status.fnc)
         {
           char emptystring[1] = {0};
diff --git a/src/status-table.c b/src/status-table.c
index f44a08f..c9bf357 100644
--- a/src/status-table.c
+++ b/src/status-table.c
@@ -178,6 +178,6 @@ _gpgme_status_to_string (gpgme_status_code_t code)
 
   for (i=0; i < DIM(status_table); i++)
     if (status_table[i].code == code)
-      return status_table[i].name;
+      return status_table[i].name? status_table[i].name : "";
   return "status_code_lost";
 }

-----------------------------------------------------------------------

Summary of changes:
 doc/gpgme.texi               |  13 ++--
 lang/cpp/src/context.cpp     |   9 +++
 lang/python/gpgme-h-clean.py |   2 +-
 src/engine-gpg.c             |   3 +-
 src/gpgme.h.in               | 148 ++++++++++++++++++++++---------------------
 src/status-table.c           |   2 +-
 6 files changed, 95 insertions(+), 82 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list