Page MenuHomePhabricator

eo: add ability to register provider on the Eo object directly.
ClosedPublic

Authored by cedric on Thu, Jul 11, 4:13 PM.

Details

Summary

This should reduce the need for custom implementation of efl_object_provider_bind.
It also enable the ability to register provider from user code on any Efl_Object.

Depends on D9291

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.Thu, Jul 11, 4:13 PM
cedric requested review of this revision.Thu, Jul 11, 4:13 PM
cedric updated this revision to Diff 23287.Thu, Jul 11, 4:16 PM
cedric edited the summary of this revision. (Show Details)
bu5hm4n requested changes to this revision.Fri, Jul 12, 4:14 AM
bu5hm4n added inline comments.
src/lib/eo/eo_base_class.c
166

This causes the wrefs to be destroyed, which means, they are not called anymore when the object is deleted, i think we also want to be able to use name and comment after invalidate.

874

This could be bad when registering twice the same klass.

This revision now requires changes to proceed.Fri, Jul 12, 4:14 AM
cedric planned changes to this revision.Fri, Jul 12, 9:02 AM
cedric added inline comments.
src/lib/eo/eo_base_class.c
166

This shouldn't _efl_object_extension_noneed check first that all the pointer in it are set to NULL before calling _efl_object_extension_free and destroying them. Do you have a test case?

874

Hum, I can easily add a test to fail when adding a class that is already registered.

cedric updated this revision to Diff 23339.Fri, Jul 12, 12:56 PM

Rebase and take comment into account.

bu5hm4n accepted this revision.Sun, Jul 14, 12:39 PM
bu5hm4n added inline comments.
src/lib/eo/eo_base_class.c
166

I was unable to read correctly, sorry :(

This revision is now accepted and ready to land.Sun, Jul 14, 12:39 PM
Closed by commit rEFL9e6d3b44e62c: eo: add ability to register provider on the Eo object directly. (authored by cedric, committed by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain WhyWed, Jul 17, 12:59 PM
This revision was automatically updated to reflect the committed changes.