Gustavo Sverzut Barbieri wrote: > On Fri, Feb 26, 2010 at 10:44 AM, Lucas De Marchi > <lucas.demar...@profusion.mobi> wrote: > >> C++ needs casts in order to assign a void* to another pointer type. As >> typeof operator is a gcc extension, we define EINA_TYPEOF(x) as "typeof" >> on gcc with c++ source and as nothing otherwise. >> > > Lucas, as I told you, I'd rather use the following patch, but it would > not help other C++ compilers, so not a real solution. > What about this:
template <typename T> inline T *cast_to(T *, void *p) { return (T *)p; } ... data = cast_to(data, l); I haven't used c++ since a while, but I think this should be portable. Regards Peter ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel