eo: Fix leak in eo_override and allow NULL to reset
authorJean-Philippe Andre <jp.andre@samsung.com>
Mon, 18 Jul 2016 08:44:51 +0000 (17:44 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 18 Jul 2016 08:55:58 +0000 (17:55 +0900)
commitcae939e2085f4c4ec4961f9815e1a270ee196691
tree585e05ff664d086d5aaedbc469589417910d721f
parentf18747e6dd6e406a2e79c80562ab830a1da40716
eo: Fix leak in eo_override and allow NULL to reset

eo_override would leak the vtable if called multiple times, this
fixes that. Also, it is now possible to revert back to the original
class' vtable by passing in { NULL, 0 }

I believe it is thus possible to incrementally override more
functions on an object. Absolutely not recommended, but should work.
But it is not possible to selectively revert back to the original
class implementation on a single method. Use eo_super for that,
or revert back the entire object overrides.

PS: Is it normal that we pass in a struct? We never do that in EFL...
src/lib/eo/eo.c