path: root/src/modules
diff options
authorMarcel Hollerbach <>2020-07-16 12:39:23 +0200
committerMarcel Hollerbach <>2020-07-20 11:27:53 +0200
commita931e418234bc567d725c79a9e4d0462e02fa5a7 (patch)
tree7d7bafa17d4cae522ccad4d8c2b0d27bb88c4bfd /src/modules
parenta9710f54c1732543f57b9a44134e406b21eba93c (diff)
efl: make all _class_get() functions const
please note, not the return type, but the function. When appending __attribute__((const)) to a function, the compiler is told that its enough to call this function once in a function. This is quite often happening when we are efl_data_scope_get and efl_super in a function that is different from a implemented function. The compiler now starts to remove the calls that aggressivly that we need to ensure that these calls are not removed, which means, the static function calls, and the eo init are now checking the return value of these functions, to ensure that they are called. Please note that you now have to be carefull when your app calls eo_shutdown, if it does so, you *must* call it at the end of a function, or never call class_get after that anymore. Overall this improves elm test runs 0.1s which is fair i guess, the main thing that is faster is textrendering, where is also the point where this is the most beneficial. Please note, this replaces 42 occurences of double _class_get() ... THAT is a sign! Reviewed-by: Stefan Schmidt <> Reviewed-by: Daniel Kolesa <> Differential Revision:
Diffstat (limited to 'src/modules')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/elementary/web/none/elm_web_none_eo.h b/src/modules/elementary/web/none/elm_web_none_eo.h
index 8bf39b1461..df91907d17 100644
--- a/src/modules/elementary/web/none/elm_web_none_eo.h
+++ b/src/modules/elementary/web/none/elm_web_none_eo.h
@@ -19,6 +19,6 @@ typedef Eo Elm_Web_None;
19 */ 19 */
20#define ELM_WEB_NONE_CLASS elm_web_none_class_get() 20#define ELM_WEB_NONE_CLASS elm_web_none_class_get()
21 21
22EWAPI const Efl_Class *elm_web_none_class_get(void); 22EWAPI const Efl_Class *elm_web_none_class_get(void) EINA_CONST;
23 23
24#endif 24#endif