diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-07-16 12:39:23 +0200 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-07-20 11:27:53 +0200 |
commit | a931e418234bc567d725c79a9e4d0462e02fa5a7 (patch) | |
tree | 7d7bafa17d4cae522ccad4d8c2b0d27bb88c4bfd /src/modules | |
parent | a9710f54c1732543f57b9a44134e406b21eba93c (diff) | |
download | efl-a931e418234bc567d725c79a9e4d0462e02fa5a7.tar.gz |
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 <stefan@datenfreihafen.org>
Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Differential Revision: https://phab.enlightenment.org/D12057
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/elementary/web/none/elm_web_none_eo.h | 2 |
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; */ #define ELM_WEB_NONE_CLASS elm_web_none_class_get() -EWAPI const Efl_Class *elm_web_none_class_get(void); +EWAPI const Efl_Class *elm_web_none_class_get(void) EINA_CONST; #endif |