path: root/src/lib/ecore/
diff options
authorCarsten Haitzler (Rasterman) <>2019-02-12 19:54:22 +0000
committerCarsten Haitzler (Rasterman) <>2019-02-12 19:54:35 +0000
commita57c7f751023fe1d1edeabbf8683574ac7497e5e (patch)
tree8803287a8502e666ee9f1762d850e9c9e978506c /src/lib/ecore/
parente908142da6e27a8e38f29895770d5d40f8587498 (diff)
Revert command line array object because it's broken by design
Revert "ecore: get rid of commands in efl_task." This reverts commit 616381e9cfed41b83fef039b0e38c09b41fd3d7f. Revert "ecore: here comes a command line object" This reverts commit 48e5684b3c37b337edd7004e68fc0690b58a84e6. 1. this is broken: EOLIAN static const char* _efl_core_command_line_command_get(const Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd) { return eina_strdup(pd->string_command); } it returns a const char * BUT it duplicates it on return. no. a big fat honking NO. return a char * or don't duplicate. pick. 2. _efl_core_command_line_command_array_set() is broken by design. it accepts an array of strings, but the strings are owned by the caller who creates the array (requiring they free them up themselves after this call) but the array becomes owned by the callee. the code here frees the incoming array but doesn't care about the string content of it. it's leak heaven waiting to happen (or bugs when someone wants to access the array they create to walk it to free the strings they put into it after it is set). i brought this up and it was dismissed. now exactly he issue i brought up is there with mixed ownership and the added complexity as well as transfer of some ownership but not others. go back and think about this so it isn't broken by design.
Diffstat (limited to '')
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/ecore/ b/src/lib/ecore/
index 2e44804481..98909cb618 100644
--- a/src/lib/ecore/
+++ b/src/lib/ecore/
@@ -76,8 +76,7 @@ pub_eo_files = [
76 'efl_composite_model.eo', 76 'efl_composite_model.eo',
77 'efl_view_model.eo', 77 'efl_view_model.eo',
78 'efl_core_env.eo', 78 'efl_core_env.eo',
79 'efl_core_proc_env.eo', 79 'efl_core_proc_env.eo'
80 'efl_core_command_line.eo',
81] 80]
82 81
83foreach eo_file : pub_eo_files 82foreach eo_file : pub_eo_files
@@ -181,12 +180,10 @@ ecore_src = [
181 'ecore_main_common.h', 180 'ecore_main_common.h',
182 'efl_exe.c', 181 'efl_exe.c',
183 'efl_thread.c', 182 'efl_thread.c',
184 'efl_appthread.c',
185 'efl_threadio.c', 183 'efl_threadio.c',
186 'efl_appthread.c', 184 'efl_appthread.c',
187 'efl_core_env.c', 185 'efl_core_env.c',
188 'efl_core_proc_env.c', 186 'efl_core_proc_env.c',
189 'efl_core_command_line.c',
190] 187]
191 188
192if sys_windows == true 189if sys_windows == true