[glib/glib-2-30] gmacros: Hide G_STATIC_ASSERT from g-ir-scanner
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-30] gmacros: Hide G_STATIC_ASSERT from g-ir-scanner
- Date: Wed, 5 Oct 2011 17:41:04 +0000 (UTC)
commit aae2f00d5eeeb7de04c4873eae4348dbb1e41184
Author: Colin Walters <walters verbum org>
Date: Wed Oct 5 11:27:45 2011 -0400
gmacros: Hide G_STATIC_ASSERT from g-ir-scanner
The C syntax here is twisted and confuses the scanner. We don't
need to see it, so let's just skip it.
glib/gmacros.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/glib/gmacros.h b/glib/gmacros.h
index f8ce714..d8ab4fa 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -144,10 +144,12 @@
#define G_STRINGIFY(macro_or_string) G_STRINGIFY_ARG (macro_or_string)
#define G_STRINGIFY_ARG(contents) #contents
+#ifndef __GI_SCANNER__ /* The static assert macro really confuses the introspection parser */
#define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
#define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2)
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __LINE__)[(expr) ? 1 : -1]
#define G_STATIC_ASSERT_EXPR(expr) ((void) sizeof (char[(expr) ? 1 : -1]))
+#endif
/* Provide a string identifying the current code position */
#if defined(__GNUC__) && (__GNUC__ < 3) && !defined(__cplusplus)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]