From: Marcus Brinkmann Date: Thu, 25 Dec 2003 14:38:40 +0000 (+0000) Subject: doc/ X-Git-Tag: gpgme-0-4-4~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=de739f876b8d506e32a209d2979ed44a0a33b41d;p=gpgme.git doc/ 2003-12-25 Marcus Brinkmann * gpgme.texi (Key Management): Rename member class in gpgme_key_sig_t to sig_class. (Creating a Signature): Likewise for gpgme_signature_t. gpgme/ 2003-12-25 Marcus Brinkmann * gpgme.h (_GPGME_D_CLASS): Revert this change. (struct _gpgme_key_sig): For C++ compilers, rename class member to _obsolete_class. Add new member sig_class. (struct _gpgme_new_signature): Same here. * key.c (gpgme_key_sig_get_ulong_attr): Use CERTSIG->sig_class, not CERTSIG->class. * keylist.c (keylist_colon_handler): Likewise for KEYSIG, but keep setting KEYSIG->class, too. Rename variable CLASS to SIG_CLASS. * sign.c (parse_sig_created): Set SIG->sig_class. --- diff --git a/NEWS b/NEWS index 72f615f..4818a78 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,17 @@ Noteworthy changes in version 0.4.4 (unreleased) ------------------------------------------------ + * The member "class" in gpgme_key_sig_t and gpgme_new_signature_t has + been renamed to "sig_class", to avoid clash with C++ compilers. In + the C API, the old name "class" has been preserved for backwards + compatibility, but is deprecated. + + * Interface changes relative to the 0.4.3 release: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +gpgme_key_sig_t CHANGED: class deprecated, use new sig_class. +gpgme_new_signature_t CHANGED: class deprecated, use new sig_class. + + Noteworthy changes in version 0.4.3 (2003-10-06) ------------------------------------------------ diff --git a/doc/ChangeLog b/doc/ChangeLog index 1589e41..6d6d7bb 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2003-12-25 Marcus Brinkmann + + * gpgme.texi (Key Management): Rename member class in + gpgme_key_sig_t to sig_class. + (Creating a Signature): Likewise for gpgme_signature_t. + 2003-12-23 Moritz Schulte * gpgme.texi (Listing Keys): Minor clarification for diff --git a/doc/gpgme.texi b/doc/gpgme.texi index 8c34f89..071793f 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -2199,7 +2199,7 @@ signature does not expire. This is the status of the signature and has the same meaning as the member of the same name in a @code{gpgme_signature_t} object. -@item unsigned int class +@item unsigned int sig_class This specifies the signature class of the key signature. The meaning is specific to the crypto engine. @@ -4038,7 +4038,7 @@ The public key algorithm used to create this signature. @item gpgme_hash_algo_t The hash algorithm used to create this signature. -@item unsigned int class +@item unsigned int sig_class The signature class of this signature. @item long int timestamp diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 61b69fe..6506525 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,15 @@ +2003-12-25 Marcus Brinkmann + + * gpgme.h (_GPGME_D_CLASS): Revert this change. + (struct _gpgme_key_sig): For C++ compilers, rename class + member to _obsolete_class. Add new member sig_class. + (struct _gpgme_new_signature): Same here. + * key.c (gpgme_key_sig_get_ulong_attr): Use CERTSIG->sig_class, + not CERTSIG->class. + * keylist.c (keylist_colon_handler): Likewise for KEYSIG, but keep + setting KEYSIG->class, too. Rename variable CLASS to SIG_CLASS. + * sign.c (parse_sig_created): Set SIG->sig_class. + 2003-12-22 Werner Koch * gpgme.h (_GPGME_D_CLASS): Kludge for C++ compatibility without diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h index ac5cea7..4c37961 100644 --- a/gpgme/gpgme.h +++ b/gpgme/gpgme.h @@ -44,10 +44,6 @@ extern "C" { #if 0 /* just to make Emacs auto-indent happy */ } #endif -/* Keyword renaming for the sake of C doubleplus. */ -#define _GPGME_D_CLASS clazz -#else -#define _GPGME_D_CLASS class #endif /* __cplusplus */ #include @@ -510,8 +506,12 @@ struct _gpgme_key_sig /* Same as in gpgme_signature_t. */ gpgme_error_t status; - /* Crypto backend specific signature class. */ - unsigned int _GPGME_D_CLASS; +#ifdef __cplusplus + unsigned int _obsolete_class _GPGME_DEPRECATED; +#else + /* Must be set to SIG_CLASS below. */ + unsigned int class _GPGME_DEPRECATED; +#endif /* The user ID string. */ char *uid; @@ -524,6 +524,9 @@ struct _gpgme_key_sig /* The comment part of the user ID. */ char *comment; + + /* Crypto backend specific signature class. */ + unsigned int sig_class; }; typedef struct _gpgme_key_sig *gpgme_key_sig_t; @@ -1090,8 +1093,15 @@ struct _gpgme_new_signature /* The fingerprint of the signature. */ char *fpr; +#ifdef __cplusplus + unsigned int _obsolete_class_2; +#else + /* Must be set to SIG_CLASS below. */ + unsigned int class _GPGME_DEPRECATED; +#endif + /* Crypto backend specific signature class. */ - unsigned int _GPGME_D_CLASS; + unsigned int sig_class; }; typedef struct _gpgme_new_signature *gpgme_new_signature_t; diff --git a/gpgme/key.c b/gpgme/key.c index 3c0d736..05beb11 100644 --- a/gpgme/key.c +++ b/gpgme/key.c @@ -695,7 +695,7 @@ gpgme_key_sig_get_ulong_attr (gpgme_key_t key, int uid_idx, _gpgme_attr_t what, return certsig->expired; case GPGME_ATTR_SIG_CLASS: - return certsig->class; + return certsig->sig_class; case GPGME_ATTR_SIG_STATUS: return certsig->status; diff --git a/gpgme/keylist.c b/gpgme/keylist.c index 88ce7ca..99499de 100644 --- a/gpgme/keylist.c +++ b/gpgme/keylist.c @@ -650,11 +650,12 @@ keylist_colon_handler (void *priv, char *line) if (fields >= 11) if (field[10][0] && field[10][1]) { - int class = _gpgme_hextobyte (field[10]); - if (class >= 0) + int sig_class = _gpgme_hextobyte (field[10]); + if (sig_class >= 0) { - keysig->class = class; - if (class == 0x30) + keysig->sig_class = sig_class; + keysig->class = keysig->sig_class; + if (sig_class == 0x30) keysig->revoked = 1; } if (field[10][2] == 'x') diff --git a/gpgme/sign.c b/gpgme/sign.c index 4c71f80..4e1a523 100644 --- a/gpgme/sign.c +++ b/gpgme/sign.c @@ -143,8 +143,9 @@ parse_sig_created (char *args, gpgme_new_signature_t *sigp) } args = tail; - sig->class = strtol (args, &tail, 0); - sig->_obsolete_class = sig->class; + sig->sig_class = strtol (args, &tail, 0); + sig->class = sig->sig_class; + sig->_obsolete_class = sig->sig_class; if (errno || args == tail || *tail != ' ') { /* The crypto backend does not behave. */