Am Thu, 20 Dec 2012 14:29:36 +0900 schrieb Carsten Haitzler (The
Rasterman):

> On Thu, 20 Dec 2012 00:04:33 -0200 Lucas De Marchi
> <[email protected]> said:
> 
> > On Wed, Dec 19, 2012 at 7:24 PM, Andreas Volz <[email protected]>
> > wrote:
> > > Hello,
> > >
> > > Times ago I wrote some Eflxx Evas Canvas wrapper. There are those
> > > functions in Canvas.cpp/.h:
> > >
> > > Canvas *Canvas::wrap (Evas_Object *o)
> > > {
> > >   return new Canvas (evas_object_evas_get (o));
> > > }
> > >
> > > Canvas *Canvas::wrap (Evas *evas)
> > > {
> > >   return new Canvas (evas);
> > > }
> > >
> > > One time it stopped compiling on Ubuntu Precise and as workaround
> > > I just commented out the second wrap() function.
> > >
> > > Then I noticed the launchpad precise build job fails in ecorexx
> > > with the same source it local compiles:
> > >
> > > https://launchpadlibrarian.net/125311410/buildlog_ubuntu-precise-amd64.ecorexx_0.1-0~201212100108~precise1_FAILEDTOBUILD.txt.gz
> > >
> > > EvasWindowFB.cpp: In constructor
> > > 'Ecorexx::EvasWindowFB::EvasWindowFB(const Eflxx::Size&, const
> > > char*, int)': EvasWindowFB.cpp:73:56: error: no matching function
> > > for call to 'Evasxx::Canvas::wrap(Evas*)' EvasWindowFB.cpp:73:56:
> > > note: candidate is: /usr/include/evasxx/Canvas.h:82:18: note:
> > > static Evasxx::Canvas*
> > > Evasxx::Canvas::wrap(Evas_Object*) /usr/include/evasxx/Canvas.h:82:18:
> > > note:   no known conversion for argument 1 from 'Evas* {aka
> > > _Evas*}' to 'Evas_Object* {aka _Evas_Object*}'
> > >
> > > Strange! Then I uncomment the second wrap function and local get
> > > this error:
> > >
> > > In file included from Canvas.cpp:6:0:
> > > ../include/evasxx/Canvas.h:94:18: error: 'static Evasxx::Canvas*
> > > Evasxx::Canvas::wrap(Evas*)' cannot be
> > > overloaded ../include/evasxx/Canvas.h:82:18: error: with 'static
> > > Evasxx::Canvas* Evasxx::Canvas::wrap(Evas_Object*)'
> > > Canvas.cpp:178:9: error: redefinition of 'static Evasxx::Canvas*
> > > Evasxx::Canvas::wrap(Evas*)' Canvas.cpp:173:9: error: 'static
> > > Evasxx::Canvas* Evasxx::Canvas::wrap (Evas_Object*)' previously
> > > defined here make[2]: *** [Canvas.lo] Fehler 1
> > >
> > > Why does the compiler detect Evas* as redefinition of Evas_Object*
> > > parameter? Did something change?
> > >
> > > Why couldn't I overload it? I may simply change wrap() to
> > > wrapEvas() or so, but I really like to understand it.
> > 
> > See Evas.h, now they are both a typedef to Eo. For me this is an API
> > break, but it doesn't seem to be for others...
> 
> it's not an api break imho.

Hm, why does then my code not longer compile if this is no API
change? :-P

-- 
Technical Blog <http://andreasvolz.wordpress.com/>

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to