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

Ben Chan benchan at chromium.org
Wed Jun 28 15:28:21 UTC 2017


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.
---
 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 (
-- 
2.13.2.725.g09c95d1e9-goog



More information about the libmbim-devel mailing list