Page MenuHomePhabricator

ecore: update Efl.Boolean_Model to handle children removal and shifting all necessary boolean and index.
ClosedPublic

Authored by cedric on Sep 19 2019, 1:11 PM.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cedric created this revision.Sep 19 2019, 1:11 PM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

cedric requested review of this revision.Sep 19 2019, 1:11 PM
cedric updated this revision to Diff 25282.Sep 20 2019, 3:23 PM

phab!!!

bu5hm4n requested changes to this revision.Sep 23 2019, 8:51 AM
bu5hm4n added inline comments.
src/lib/ecore/efl_boolean_model.c
24

uhm, this is 16 bit long, so it can have 0..2^16, so i think this comment about 256 is wrong?

27

I think this buffer needs to be bigger ?

106

Are you sure about the & in the sizeof?

108

I think this here is a problem, the default value is either 0 or 1 but memset does set things bytewise.

462–463

Isnt that wrong and we should only do that if the first bit is equal to request earlier on ?

469

I think all default values in the iterator have to be the same as we are walking the same boolean property type, why is this check here?

This revision now requires changes to proceed.Sep 23 2019, 8:51 AM
cedric planned changes to this revision.Sep 23 2019, 10:12 AM
cedric added inline comments.
src/lib/ecore/efl_boolean_model.c
27

Nah the size is correct. Problem with 256, is that if you use a uchar to count, you will wrap in some case without a way to detect it (So for safety I switched to ushort). Will change the comment accordingly.

106

I will double check that. I did make a few change along the way and it is indeed not clear this is correct.

108

default_value is set via !! which force a full bytewise 0 and 1 to be set.

462–463

You are right the init case is not properly handle. Need to make sure that at least there is one first run being done before returning an index.

469

You can request an iterator on all value being TRUE or FALSE. As the default value can also be one or the other, we need to stop walking if the default value is not the same as the requested value for the iterator.

cedric updated this revision to Diff 25409.Sep 23 2019, 4:08 PM

rebase and take comments into account

bu5hm4n accepted this revision.Sep 23 2019, 11:56 PM
bu5hm4n added inline comments.
src/lib/ecore/efl_boolean_model.c
108

Oh, that is new black magic to me.

This revision is now accepted and ready to land.Sep 23 2019, 11:56 PM
Closed by commit rEFL23c24b36a120: ecore: update Efl.Boolean_Model to handle children removal and shifting all… (authored by cedric, committed by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain WhySep 24 2019, 12:19 AM
This revision was automatically updated to reflect the committed changes.