From cd0f8e5cd159e96a7d27bfd6b8cbbc418b84d9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 16 Jun 2016 16:32:04 -0400 Subject: [PATCH] cogl: Let the g-ir-scanner see the type structs typedefs By only showing the g-ir-scanner void typedefs it will make it print warnings. Lets please it by showing the actual typedef. https://bugzilla.gnome.org/show_bug.cgi?id=768977 --- cogl/cogl/cogl-buffer.h | 3 ++- cogl/cogl/cogl-framebuffer.h | 3 ++- cogl/cogl/cogl-meta-texture.h | 3 ++- cogl/cogl/cogl-primitive-texture.h | 3 ++- cogl/cogl/cogl-texture.h | 3 ++- cogl/cogl/deprecated/cogl-type-casts.h | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/cogl/cogl/cogl-buffer.h b/cogl/cogl/cogl-buffer.h index adbc51f9c..68fec49fc 100644 --- a/cogl/cogl/cogl-buffer.h +++ b/cogl/cogl/cogl-buffer.h @@ -66,7 +66,8 @@ COGL_BEGIN_DECLS * without blocking other Cogl operations. */ -#ifdef __COGL_H_INSIDE__ +#if defined(__COGL_H_INSIDE__) && !defined(COGL_ENABLE_MUTTER_API) && \ + !defined(COGL_GIR_SCANNING) /* For the public C api we typedef interface types as void to avoid needing * lots of casting in code and instead we will rely on runtime type checking * for these objects. */ diff --git a/cogl/cogl/cogl-framebuffer.h b/cogl/cogl/cogl-framebuffer.h index 1ab57377e..d47a78e79 100644 --- a/cogl/cogl/cogl-framebuffer.h +++ b/cogl/cogl/cogl-framebuffer.h @@ -37,7 +37,8 @@ /* We forward declare the CoglFramebuffer type here to avoid some circular * dependency issues with the following headers. */ -#if defined(__COGL_H_INSIDE__) && !defined(COGL_ENABLE_MUTTER_API) +#if defined(__COGL_H_INSIDE__) && !defined(COGL_ENABLE_MUTTER_API) && \ + !defined(COGL_GIR_SCANNING) /* For the public C api we typedef interface types as void to avoid needing * lots of casting in code and instead we will rely on runtime type checking * for these objects. */ diff --git a/cogl/cogl/cogl-meta-texture.h b/cogl/cogl/cogl-meta-texture.h index e5e68933f..c347881e7 100644 --- a/cogl/cogl/cogl-meta-texture.h +++ b/cogl/cogl/cogl-meta-texture.h @@ -92,7 +92,8 @@ COGL_BEGIN_DECLS * meta-textures. */ -#if defined(__COGL_H_INSIDE__) && !defined(COGL_ENABLE_MUTTER_API) +#if defined(__COGL_H_INSIDE__) && !defined(COGL_ENABLE_MUTTER_API) && \ + !defined(COGL_GIR_SCANNING) /* For the public C api we typedef interface types as void to avoid needing * lots of casting in code and instead we will rely on runtime type checking * for these objects. */ diff --git a/cogl/cogl/cogl-primitive-texture.h b/cogl/cogl/cogl-primitive-texture.h index effaac35b..a8102579c 100644 --- a/cogl/cogl/cogl-primitive-texture.h +++ b/cogl/cogl/cogl-primitive-texture.h @@ -63,7 +63,8 @@ COGL_BEGIN_DECLS * primitive textures. */ -#ifdef __COGL_H_INSIDE__ +#if defined(__COGL_H_INSIDE__) && !defined(COGL_ENABLE_MUTTER_API) && \ + !defined(COGL_GIR_SCANNING) /* For the public C api we typedef interface types as void to avoid needing * lots of casting in code and instead we will rely on runtime type checking * for these objects. */ diff --git a/cogl/cogl/cogl-texture.h b/cogl/cogl/cogl-texture.h index 8440f8827..ef7d14281 100644 --- a/cogl/cogl/cogl-texture.h +++ b/cogl/cogl/cogl-texture.h @@ -38,7 +38,8 @@ /* We forward declare the CoglTexture type here to avoid some circular * dependency issues with the following headers. */ -#if defined(__COGL_H_INSIDE__) && !defined(COGL_ENABLE_MUTTER_API) +#if defined(__COGL_H_INSIDE__) && !defined(COGL_ENABLE_MUTTER_API) && \ + !defined(COGL_GIR_SCANNING) /* For the public C api we typedef interface types as void to avoid needing * lots of casting in code and instead we will rely on runtime type checking * for these objects. */ diff --git a/cogl/cogl/deprecated/cogl-type-casts.h b/cogl/cogl/deprecated/cogl-type-casts.h index 61c6fafc4..c35ea056b 100644 --- a/cogl/cogl/deprecated/cogl-type-casts.h +++ b/cogl/cogl/deprecated/cogl-type-casts.h @@ -44,7 +44,7 @@ * so these macros are only kept for compatibility... */ -#ifndef COGL_ENABLE_MUTTER_API +#if !defined(COGL_ENABLE_MUTTER_API) && !defined(COGL_GIR_SCANNING) #define COGL_FRAMEBUFFER(X) (X) #define COGL_BUFFER(X) (X) #define COGL_TEXTURE(X) (X)