eo: Make efl_cast() return NULL if invalid cast
authorJean-Philippe Andre <jp.andre@samsung.com>
Mon, 29 May 2017 02:28:13 +0000 (11:28 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 29 May 2017 04:29:03 +0000 (13:29 +0900)
commitac3abd1f5b29a978167b83ffd43fb7c56fa678d7
treec93a6248c58f03ead5b32d0320d54af267dd2d9b
parent11d4daf90a04639dcb8c75f793bc6c976f3c1808
eo: Make efl_cast() return NULL if invalid cast

This makes it work like C++ dynamic_cast<> operator, so that
the return value will be NULL if the object is not an instance
of the given class.

In case of efl_super() we don't do it as efl_super is used A LOT
inside EFL itself (all constructors & destructors, for a start)
and efl_isa is in fact a bit expensive. efl_cast isn't really used
and is intended to be something like dynamic_cast.

For @cedric :)
src/lib/eo/eo.c