diff options
author | Cedric BAIL <cedric@osg.samsung.com> | 2018-05-03 16:34:17 -0700 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2018-05-24 16:02:18 -0700 |
commit | 8a513a522e90253ce7ec85e92c7bc58dfb22a2bc (patch) | |
tree | abeafb5e5bce67ed685e4e82f0d756de46ef60ec /src/lib/eolian_cxx | |
parent | c28eb28728c280d3fd19ef46790fce6f9465d4f5 (diff) |
efl: major rewrite of efl_part.
The interface efl_part_get should not be directly called from C, but the efl_part
wrapper should. It rely on efl_noref to properly destroy the object. Binding can
control the lifecycle of the reference the way they want by either calling the
wrapper or efl_part_get directly. It also means that the ugly ___efl_auto_unref_set
doesn't need to be exposed outside of EFL anymore.
Differential Revision: https://phab.enlightenment.org/D6098
Diffstat (limited to 'src/lib/eolian_cxx')
-rw-r--r-- | src/lib/eolian_cxx/grammar/part_implementation.hpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/eolian_cxx/grammar/part_implementation.hpp b/src/lib/eolian_cxx/grammar/part_implementation.hpp index d88ae05b92..ec4da28913 100644 --- a/src/lib/eolian_cxx/grammar/part_implementation.hpp +++ b/src/lib/eolian_cxx/grammar/part_implementation.hpp | |||
@@ -29,9 +29,8 @@ struct part_implementation_generator | |||
29 | return false; | 29 | return false; |
30 | // FIXME: part_def can't depend on klass_def so C type is not known :( | 30 | // FIXME: part_def can't depend on klass_def so C type is not known :( |
31 | if(!as_generator(string << ">::type "<< string << "::" << string << "() const\n{\n" | 31 | if(!as_generator(string << ">::type "<< string << "::" << string << "() const\n{\n" |
32 | << scope_tab << "::Eo *__return_value = ::efl_part" | 32 | << scope_tab << "::Eo *__return_value = ::efl_part_get" |
33 | << "(this->_eo_ptr(), \"" << string << "\");\n" | 33 | << "(this->_eo_ptr(), \"" << string << "\");\n") |
34 | << scope_tab << "::___efl_auto_unref_set(__return_value, false);\n") | ||
35 | .generate(sink, std::make_tuple(part.klass.eolian_name, klass_name, part.name, part.name), ctx)) | 34 | .generate(sink, std::make_tuple(part.klass.eolian_name, klass_name, part.name, part.name), ctx)) |
36 | return false; | 35 | return false; |
37 | if(!as_generator(scope_tab << "return ::" << *(string << "::")) | 36 | if(!as_generator(scope_tab << "return ::" << *(string << "::")) |