Eo: eo_do now returns called func's value + default ret fix.
authorTom Hacohen <tom@stosb.com>
Mon, 14 Apr 2014 09:36:09 +0000 (10:36 +0100)
committerTom Hacohen <tom@stosb.com>
Mon, 14 Apr 2014 09:54:08 +0000 (10:54 +0100)
commitd77a7ce4689becaee2a4076283be9460e65429f4
treebcbc2a857ed054950d480cde4d1f02fd74ca7124
parent68a1f1941acdbde01a06983b7cb46624a2578abb
Eo: eo_do now returns called func's value + default ret fix.

It's now completely valid to do:
a = eo_do(obj, a_get());

or:
b = eo_do(obj, a_set(1), b_get());

Also, the default return value for eo2 functions is now also returned
when the object is invalid, not just when the object does not match
class.

It's a small refactor that fixed both issues at once.

@feature
@fix
src/lib/eo/Eo.h
src/lib/eo/eo.c