Skip to content

Commit 9bac60b

Browse files
authored
disable assert for gi scanner (#720)
The COGL_STRUCT_SIZE_ASSERT macro causes gi scanner to generate code that does not compile.
1 parent 051b8d2 commit 9bac60b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cogl/cogl/cogl-types.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,15 @@ G_BEGIN_DECLS
6767
* be stack allocated we use this macro to compile time assert that
6868
* a struct size is as expected.
6969
*/
70+
#ifndef __GI_SCANNER__
7071
#define COGL_STRUCT_SIZE_ASSERT(TYPE, SIZE) \
7172
typedef struct { \
7273
char compile_time_assert_ ## TYPE ## _size[ \
7374
(sizeof (TYPE) == (SIZE)) ? 1 : -1]; \
7475
} _ ## TYPE ## SizeCheck
75-
76+
#else
77+
#define COGL_STRUCT_SIZE_ASSERT(TYPE, SIZE)
78+
#endif
7679
/**
7780
* CoglHandle:
7881
*

0 commit comments

Comments
 (0)