dbus/dbus dbus-macros.h, 1.8, 1.9 dbus-message.c, 1.181,
1.182 dbus-message.h, 1.62, 1.63
Havoc Pennington
hp at kemper.freedesktop.org
Sat Oct 21 10:43:32 PDT 2006
Update of /cvs/dbus/dbus/dbus
In directory kemper:/tmp/cvs-serv25537/dbus
Modified Files:
dbus-macros.h dbus-message.c dbus-message.h
Log Message:
2006-10-21 Havoc Pennington <hp at redhat.com>
* dbus/dbus-macros.h: add DBUS_GNUC_DEPRECATED macro
* dbus/dbus-message.h: mark dbus_message_iter_get_array_len()
as DBUS_GNUC_DEPRECATED
Index: dbus-macros.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-macros.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- dbus-macros.h 10 Aug 2006 22:58:05 -0000 1.8
+++ dbus-macros.h 21 Oct 2006 17:43:30 -0000 1.9
@@ -50,6 +50,12 @@
# endif /* !__cplusplus */
#endif
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+#define DBUS_GNUC_DEPRECATED __attribute__((__deprecated__))
+#else
+#define DBUS_GNUC_DEPRECATED
+#endif
+
/* Normally docs are in .c files, but there isn't a .c file for this. */
/**
* @defgroup DBusMacros Utility macros
@@ -67,6 +73,9 @@
* Macro used prior to declaring functions in the D-Bus header
* files. Expands to "extern "C"" when using a C++ compiler,
* and expands to nothing when using a C compiler.
+ *
+ * Please don't use this in your own code, consider it
+ * D-Bus internal.
*/
/**
* @def DBUS_END_DECLS
@@ -74,6 +83,9 @@
* Macro used after declaring functions in the D-Bus header
* files. Expands to "}" when using a C++ compiler,
* and expands to nothing when using a C compiler.
+ *
+ * Please don't use this in your own code, consider it
+ * D-Bus internal.
*/
/**
* @def TRUE
@@ -90,6 +102,20 @@
*
* A null pointer, defined appropriately for C or C++.
*/
+/**
+ * @def DBUS_GNUC_DEPRECATED
+ *
+ * Tells gcc to warn about a function or type if it's used.
+ * Code marked in this way should also be enclosed in
+ * @code
+ * #ifndef DBUS_DISABLE_DEPRECATED
+ * deprecated stuff here
+ * #endif
+ * @endcode
+ *
+ * Please don't use this in your own code, consider it
+ * D-Bus internal.
+ */
/** @} */
Index: dbus-message.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.c,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -d -r1.181 -r1.182
--- dbus-message.c 21 Oct 2006 17:21:45 -0000 1.181
+++ dbus-message.c 21 Oct 2006 17:43:30 -0000 1.182
@@ -1255,6 +1255,9 @@
* See dbus_message_new_error() for details - this function is the same
* aside from the printf formatting.
*
+ * @todo add _DBUS_GNUC_PRINTF to this (requires moving _DBUS_GNUC_PRINTF to
+ * public header, see DBUS_GNUC_DEPRECATED for an example)
+ *
* @param reply_to the original message
* @param error_name the error name
* @param error_format the error message format as with printf
Index: dbus-message.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.h,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- dbus-message.h 21 Oct 2006 17:08:08 -0000 1.62
+++ dbus-message.h 21 Oct 2006 17:43:30 -0000 1.63
@@ -167,7 +167,7 @@
/* This function returns the wire protocol size of the array in bytes,
* you do not want to know that probably
*/
-int dbus_message_iter_get_array_len (DBusMessageIter *iter);
+int dbus_message_iter_get_array_len (DBusMessageIter *iter) DBUS_GNUC_DEPRECATED;
#endif
void dbus_message_iter_get_fixed_array (DBusMessageIter *iter,
void *value,
More information about the dbus-commit
mailing list