summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2015-12-05 15:39:30 +0000
committerSimon McVittie <smcv@debian.org>2015-12-05 15:39:30 +0000
commit6e4ebe32f0f14aceb91011e422eb232e8dd21d4f (patch)
tree3490efaed8dd4ae988fb33ff0ed2ae3d7b93e837
parent2ad803c5326af0569fdb36ce90166292b9fe9a79 (diff)
downloaddbus-python-6e4ebe32f0f14aceb91011e422eb232e8dd21d4f.tar.gz
_dbus_py_assertion_failed: flag as NORETURN
-rw-r--r--_dbus_bindings/dbus_bindings-internal.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/_dbus_bindings/dbus_bindings-internal.h b/_dbus_bindings/dbus_bindings-internal.h
index 4b831e8..b22f586 100644
--- a/_dbus_bindings/dbus_bindings-internal.h
+++ b/_dbus_bindings/dbus_bindings-internal.h
@@ -33,6 +33,19 @@
#define INSIDE_DBUS_PYTHON_BINDINGS
#include "dbus-python.h"
+#if defined(__GNUC__)
+# if __GNUC__ >= 3
+# define UNUSED __attribute__((__unused__))
+# define NORETURN __attribute__((__noreturn__))
+# else
+# define UNUSED /*nothing*/
+# define NORETURN /*nothing*/
+# endif
+#else
+# define UNUSED /*nothing*/
+# define NORETURN /*nothing*/
+#endif
+
/* no need for extern "C", this is only for internal use */
/* on/off switch for debugging support (see below) */
@@ -219,7 +232,7 @@ dbus_bool_t dbus_py_validate_object_path(const char *path);
#define dbus_py_validate_error_name dbus_py_validate_interface_name
/* debugging support */
-void _dbus_py_assertion_failed(const char *);
+void _dbus_py_assertion_failed(const char *) NORETURN;
#define DBUS_PY_RAISE_VIA_NULL_IF_FAIL(assertion) \
do { if (!(assertion)) { \
_dbus_py_assertion_failed(#assertion); \
@@ -279,14 +292,4 @@ void _dbus_py_dbg_dump_message(DBusMessage *);
#define DEFERRED_ADDRESS(ADDR) 0
-#if defined(__GNUC__)
-# if __GNUC__ >= 3
-# define UNUSED __attribute__((__unused__))
-# else
-# define UNUSED /*nothing*/
-# endif
-#else
-# define UNUSED /*nothing*/
-#endif
-
#endif