[PATCH] libmbim-glib: make gtk-doc work again on deprecated enumerators

Aleksander Morgado aleksander at aleksander.es
Wed Jun 28 15:23:08 UTC 2017


On Wed, Jun 28, 2017 at 4:53 PM, Ben Chan <benchan at chromium.org> wrote:
> Commit e5b6807d6 "libmbim-glib: fix G_DEPRECATED_FOR annotations"
> replaced macro defintions with `static const int' definitions for those
> deprecated enumerators. However, gtk-doc doesn't seem to document
> `static const int' defintions. This patch works around the issue by
> adding a macro defintion on top of a `static const int' defintion.

Could we make it MBIM_DEPRECATED... ? i.e. to keep the MBIM_ prefix.

> ---
>  src/libmbim-glib/mbim-compat.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/libmbim-glib/mbim-compat.h b/src/libmbim-glib/mbim-compat.h
> index 88966db..23361ee 100644
> --- a/src/libmbim-glib/mbim-compat.h
> +++ b/src/libmbim-glib/mbim-compat.h
> @@ -43,8 +43,9 @@ G_BEGIN_DECLS
>   * Deprecated:1.8.0: Use MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH instead.
>   */
>  G_DEPRECATED_FOR (MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH)
> -static const int MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH =
> +static const int DEPRECATED_MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH =
>      MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH;
> +#define MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH DEPRECATED_MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH
>
>  /*****************************************************************************/
>  /* 'Service Subscriber List' rename to 'Service Subscribe List' */
> @@ -57,8 +58,9 @@ static const int MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH =
>   * Deprecated:1.8.0: Use MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST instead.
>   */
>  G_DEPRECATED_FOR (MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST)
> -static const int MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST =
> +static const int DEPRECATED_MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST =
>      MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST;
> +#define MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST DEPRECATED_MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST
>
>  G_DEPRECATED_FOR (mbim_message_device_service_subscribe_list_set_new)
>  MbimMessage *mbim_message_device_service_subscriber_list_set_new (
> --
> 2.13.2.725.g09c95d1e9-goog
>



-- 
Aleksander
https://aleksander.es


More information about the libmbim-devel mailing list