From: caro Date: Sun, 25 Oct 2009 10:19:38 +0000 (+0000) Subject: make embryo compile with vc++ and suncc. No change for gcc. X-Git-Tag: 2.0_alpha~11^2~127 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08872ba6d40347f7262c87d3780d25968c031ca3;hp=68f2b8b7dd0550d61b51f5421581db102ac3e273;p=framework%2Fuifw%2Fembryo.git make embryo compile with vc++ and suncc. No change for gcc. Though i don't know if it is the correct fix... Raster, if you have some time, can you check it, please ? git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/embryo@43261 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/Embryo.h b/src/lib/Embryo.h index 50ab731..5083a51 100644 --- a/src/lib/Embryo.h +++ b/src/lib/Embryo.h @@ -86,10 +86,17 @@ extern "C" { Embryo_Cell c; } Embryo_Float_Cell; +#if defined _MSC_VER || defined __SUNPRO_C /** Float to Embryo_Cell */ -#define EMBRYO_FLOAT_TO_CELL(f) ((Embryo_Float_Cell) f).c +# define EMBRYO_FLOAT_TO_CELL(f) (((Embryo_Float_Cell *)&(f))->c) /** Embryo_Cell to float */ -#define EMBRYO_CELL_TO_FLOAT(c) ((Embryo_Float_Cell) c).f +# define EMBRYO_CELL_TO_FLOAT(c) (((Embryo_Float_Cell *)&(c))->f) +#else +/** Float to Embryo_Cell */ +# define EMBRYO_FLOAT_TO_CELL(f) ((Embryo_Float_Cell) f).c +/** Embryo_Cell to float */ +# define EMBRYO_CELL_TO_FLOAT(c) ((Embryo_Float_Cell) c).f +#endif EAPI int embryo_init(void); EAPI int embryo_shutdown(void);