Page MenuHomePhabricator

Edje: add returned value by default(error) to edje_object_part_external_param_type_get
AbandonedPublic

Authored by artem.popov on Dec 20 2016, 4:51 AM.

Details

Summary

add returned value by default(error) to edje_object_part_external_param_type_get()
API regarding to documentation (should return ENUM(5) if error)

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2910
Build 2975: arc lint + arc unit
artem.popov retitled this revision from to Edje: add returned value by default(error) to edje_object_part_external_param_type_get.
artem.popov updated this object.
artem.popov edited the test plan for this revision. (Show Details)
artem.popov added a subscriber: myoungwoon.
cedric added a reviewer: q66.Dec 20 2016, 4:08 PM

Isn't it possible to get the enum instead of the numerical value as the default value ?

In D4502#75832, @cedric wrote:

Isn't it possible to get the enum instead of the numerical value as the default value ?

I've tried, there is compilation error

q66 edited edge metadata.Dec 21 2016, 5:44 AM

Just tested,

return: Edje.External.Param_Type(Edje.External.Param_Type.max);

works just fine with no compilation errors.

Anyway, fixed in b74dd5b7f4ae4a91555f590225a57896e1cd19e9, please abandon the revision.

artem.popov added a comment.EditedDec 21 2016, 8:49 AM
In D4502#75854, @q66 wrote:

Just tested,

return: Edje.External.Param_Type(Edje.External.Param_Type.max);

works just fine with no compilation errors.

Anyway, fixed in b74dd5b7f4ae4a91555f590225a57896e1cd19e9, please abandon the revision.

Ah, sorry. I see how it should working. Thank you! I will abandon it

q66 added a comment.Dec 21 2016, 8:59 AM

yes, it works @artem.popov - if you had it expand to 0, this was before the recent bug fixes in the Eolian expression handling code (unlike previously, Eolian now fully validates all expressions and whether they match their data type, instead of silently expanding to 0 - but the particular 0 expansion previously was caused by a bug in the expr evaluator). If you still have it happening, a locally installed libeolian is probably at fault - autotools somehow prefers system libs as dependencies instead of the in-tree ones. The above fix expands to this with properly updated EFL:

EOAPI EFL_FUNC_BODYV_CONST(edje_obj_part_external_param_type_get, Edje_External_Param_Type, 5 /* Edje.External.Param_Type.max */, EFL_FUNC_CALL(part, param), const char *part, const char *param);

which is obviously correct - it evaluates to the right value and puts a comment next to it what it means.