Page MenuHomePhabricator

ecore_cocoa: move MARKUP outside of ecore_cocoa
ClosedPublic

Authored by bu5hm4n on Aug 18 2018, 2:41 AM.

Details

Summary

the elementary MARKUP stuff requires ecore_cocoa to be linked to evas to
find the function. However, ecore_XXXXX things should stay unrelated to
evas in most cases. Thus this was not a good idea and created a circular
dependency, this is fixed now.

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.
bu5hm4n created this revision.Aug 18 2018, 2:41 AM

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/

bu5hm4n requested review of this revision.Aug 18 2018, 2:41 AM
bu5hm4n edited the summary of this revision. (Show Details)Aug 18 2018, 2:43 AM
bu5hm4n added reviewers: netstar, jayji.
zmike requested changes to this revision.Aug 20 2018, 9:48 AM

Have the MARKUP enum value do nothing when passed and this seems like a reasonable solution.

src/lib/ecore_cocoa/Ecore_Cocoa.h
209 ↗(On Diff #16408)

This enum is not beta and must not be changed.

This revision now requires changes to proceed.Aug 20 2018, 9:48 AM
bu5hm4n updated this revision to Diff 16432.Aug 20 2018, 10:13 AM
bu5hm4n edited the summary of this revision. (Show Details)

review comments

zmike requested changes to this revision.Aug 20 2018, 10:15 AM

Also should remove the evas (and possibly emile?) dependencies from configure.ac around L3600.

This revision now requires changes to proceed.Aug 20 2018, 10:15 AM
bu5hm4n updated this revision to Diff 16453.Aug 21 2018, 4:25 AM

configure.ac weird compiler error

jayji requested changes to this revision.Aug 22 2018, 10:10 AM
jayji added inline comments.
src/lib/elementary/efl_selection_manager.c
4014

We have previously assigned sel->data (by duplicating memory: sel->data = eina_slice_dup(data);). This could maybe be avoided.

Also, I don't understand why to do not directly assign sel->data to result. If I understand correctly:

  • Eina_Rw_Slice result = EINA_SLICE_STR(utf8); will create a slice structure with:
    • the length of utf8,
    • a pointer to it (utf8 being heap-allocated).
  • eina_rw_slice_dup(result) will call eina_slice_dup(), which will deep-copy the string pointed by result.mem.

So I believe we should just assign result to sel->data, and therefore avoid a memory allocation, and associated memory leak.

This revision now requires changes to proceed.Aug 22 2018, 10:10 AM
jayji accepted this revision.Aug 22 2018, 11:20 AM

Okay, looks good to me.

This comment was removed by bu5hm4n.
This revision was not accepted when it landed; it landed in state Needs Review.Aug 22 2018, 11:40 AM
Closed by commit rEFL28423160d6d2: ecore_cocoa: move MARKUP outside of ecore_cocoa (authored by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain Why
This revision was automatically updated to reflect the committed changes.