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

Aleksander Morgado aleksander at aleksander.es
Wed Jun 28 16:05:30 UTC 2017


On 28/06/17 17:28, Ben Chan 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.

Pushed to git master and the stable branches, thanks.

> ---
>  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 MBIM_DEPRECATED_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH =
>      MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH;
> +#define MBIM_REGISTRATION_FLAG_MANUAL_PACKET_SERVICE_AUTOMATIC_ATTACH MBIM_DEPRECATED_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 MBIM_DEPRECATED_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST =
>      MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST;
> +#define MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBER_LIST MBIM_DEPRECATED_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 (
> 


-- 
Aleksander
https://aleksander.es


More information about the libmbim-devel mailing list