Re: [AD] Allegro 4.2.0 RC2 |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Really wonder that GCC allows "return something;" in void functions.
--
Regards,
Michal
ICQ# 175762750
--- draw.inl.old Sat Aug 27 11:26:50 2005
+++ draw.inl Sun Aug 28 10:23:32 2005
@@ -64,8 +64,8 @@
* should use the vline/hline aliases as they are the official names.
*/
#ifndef ALLEGRO_NO_VHLINE_ALIAS
- AL_ALIAS(void vline(BITMAP *bmp, int x, int y_1, int y2, int color), _allegro_vline(bmp, x, y_1, y2, color))
- AL_ALIAS(void hline(BITMAP *bmp, int x1, int y, int x2, int color), _allegro_hline(bmp, x1, y, x2, color))
+ AL_ALIAS_VOID_RET(vline(BITMAP *bmp, int x, int y_1, int y2, int color), _allegro_vline(bmp, x, y_1, y2, color))
+ AL_ALIAS_VOID_RET(hline(BITMAP *bmp, int x1, int y, int x2, int color), _allegro_hline(bmp, x1, y, x2, color))
#endif
--- alconfig.h.old Sat Aug 27 11:26:50 2005
+++ alconfig.h Sun Aug 28 10:25:11 2005
@@ -133,6 +133,14 @@
#endif
#endif
+ #ifndef AL_ALIAS_VOID_RET
+ #define AL_ALIAS_VOID_RET(DECL, CALL) \
+ static __attribute__((unused)) __inline__ void DECL \
+ { \
+ CALL; \
+ }
+ #endif
+
#ifndef AL_ALIAS
#define AL_ALIAS(DECL, CALL) \
static __attribute__((unused)) __inline__ DECL \
@@ -140,6 +148,7 @@
return CALL; \
}
#endif
+
#endif
@@ -218,6 +227,14 @@
static INLINE DECL \
{ \
return CALL; \
+ }
+#endif
+
+#ifndef AL_ALIAS_VOID_RET
+ #define AL_ALIAS_VOID_RET(DECL, CALL) \
+ static INLINE void DECL \
+ { \
+ CALL; \
}
#endif