python: Silence a few warnings.
* src/gpgme.h.in: Obsolete "class" also for Python. * lang/python/gpgme.i: Silenece a swig warning. Silence a gcc warning. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
ec2d2b78bc
commit
dcdabf5f2e
@ -21,6 +21,12 @@
|
|||||||
%include "cpointer.i"
|
%include "cpointer.i"
|
||||||
%include "cstring.i"
|
%include "cstring.i"
|
||||||
|
|
||||||
|
%{
|
||||||
|
/* We use public symbols (eg. "_obsolete_class") which are marked as
|
||||||
|
* deprecated but we need to keep them. Silence the warning. */
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
%}
|
||||||
|
|
||||||
/* Generate doc strings for all methods.
|
/* Generate doc strings for all methods.
|
||||||
|
|
||||||
This will generate docstrings of the form
|
This will generate docstrings of the form
|
||||||
@ -575,7 +581,8 @@ off_t gpgme_data_seek (gpgme_data_t dh, off_t offset, int whence=SEEK_SET);
|
|||||||
%}
|
%}
|
||||||
|
|
||||||
/* This is for notations, where we want to hide the length fields, and
|
/* This is for notations, where we want to hide the length fields, and
|
||||||
the unused bit field block. */
|
* the unused bit field block. We silence the warning. */
|
||||||
|
%warnfilter(302) _gpgme_sig_notation;
|
||||||
struct _gpgme_sig_notation
|
struct _gpgme_sig_notation
|
||||||
{
|
{
|
||||||
struct _gpgme_sig_notation *next;
|
struct _gpgme_sig_notation *next;
|
||||||
|
@ -95,6 +95,12 @@ extern "C" {
|
|||||||
#define _GPGME_DEPRECATED_OUTSIDE_GPGME(a,b) _GPGME_DEPRECATED(a,b)
|
#define _GPGME_DEPRECATED_OUTSIDE_GPGME(a,b) _GPGME_DEPRECATED(a,b)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* We used to use some symbols which clash with keywords in some
|
||||||
|
* languages. This macro is used to obsolete them. */
|
||||||
|
#if defined(__cplusplus) || defined(SWIGPYTHON)
|
||||||
|
# define _GPGME_OBSOLETE_SOME_SYMBOLS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Check for a matching _FILE_OFFSET_BITS definition. */
|
/* Check for a matching _FILE_OFFSET_BITS definition. */
|
||||||
#if @NEED__FILE_OFFSET_BITS@
|
#if @NEED__FILE_OFFSET_BITS@
|
||||||
@ -640,7 +646,7 @@ struct _gpgme_key_sig
|
|||||||
gpgme_error_t status;
|
gpgme_error_t status;
|
||||||
|
|
||||||
/* Deprecated; use SIG_CLASS instead. */
|
/* Deprecated; use SIG_CLASS instead. */
|
||||||
#ifdef __cplusplus
|
#ifdef _GPGME_OBSOLETE_SOME_SYMBOLS
|
||||||
unsigned int _obsolete_class _GPGME_DEPRECATED(0,4);
|
unsigned int _obsolete_class _GPGME_DEPRECATED(0,4);
|
||||||
#else
|
#else
|
||||||
unsigned int class _GPGME_DEPRECATED_OUTSIDE_GPGME(0,4);
|
unsigned int class _GPGME_DEPRECATED_OUTSIDE_GPGME(0,4);
|
||||||
@ -1466,7 +1472,7 @@ struct _gpgme_new_signature
|
|||||||
char *fpr;
|
char *fpr;
|
||||||
|
|
||||||
/* Deprecated; use SIG_CLASS instead. */
|
/* Deprecated; use SIG_CLASS instead. */
|
||||||
#ifdef __cplusplus
|
#ifdef _GPGME_OBSOLETE_SOME_SYMBOLS
|
||||||
unsigned int _obsolete_class_2;
|
unsigned int _obsolete_class_2;
|
||||||
#else
|
#else
|
||||||
unsigned int class _GPGME_DEPRECATED_OUTSIDE_GPGME(0,4);
|
unsigned int class _GPGME_DEPRECATED_OUTSIDE_GPGME(0,4);
|
||||||
|
Loading…
Reference in New Issue
Block a user