ector: fix redefinition of type and bizarre typedef
authorJean Guyomarc'h <jean@guyomarch.bzh>
Sat, 28 May 2016 20:15:22 +0000 (22:15 +0200)
committerJean Guyomarc'h <jean@guyomarch.bzh>
Sat, 28 May 2016 20:17:22 +0000 (22:17 +0200)
Maybe there is a trick here I am not aware of, but
redefining a type as itself seems a mistake to me.
This raised a warning anyway. Now it's gone.

src/lib/ector/ector_buffer.h

index 8a893f0..e19c7fe 100644 (file)
@@ -3,14 +3,18 @@
 
 #include <Ector.h>
 
-#include "ector_buffer.eo.h"
-#include "software/ector_software_buffer_base.eo.h"
-
 /**
  * @typedef Ector_Buffer
  * A generic pixel buffer type (2D). May be readable or writeable or both.
  */
-typedef Ector_Buffer Ector_Buffer;
+typedef Eo Ector_Buffer;
+
+/* Avoid type redefinition */
+#define _ECTOR_BUFFER_EO_CLASS_TYPE
+
+#include "ector_buffer.eo.h"
+#include "software/ector_software_buffer_base.eo.h"
+
 
 typedef struct _Ector_Buffer_Data Ector_Buffer_Data;
 typedef struct _Ector_Software_Buffer_Base_Data Ector_Software_Buffer_Base_Data;