diff options
author | tasn <tasn> | 2012-08-23 12:14:07 +0000 |
---|---|---|
committer | tasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33> | 2012-08-23 12:14:07 +0000 |
commit | 827543ed07c14b4631bb6b97a760366bce846447 (patch) | |
tree | 0acfc325a50e5393e285bba3cc5402f77db50ad0 | |
parent | 605bea5ec6950ae488aea8e655e6bc9e2a1a6626 (diff) | |
download | eobj-827543ed07c14b4631bb6b97a760366bce846447.tar.gz eobj-827543ed07c14b4631bb6b97a760366bce846447.tar.bz2 eobj-827543ed07c14b4631bb6b97a760366bce846447.zip |
Eo: Fixed issue with eo_add ops.
This "fix" is actually just making sure gcc doesn't optimise things
wrong. If anyone has an idea how to do it better, please let me know.
klass is usually a function and needs to be evaluated before the call to
eo_add_internal.
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@75623 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
-rw-r--r-- | src/lib/Eo.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/Eo.h b/src/lib/Eo.h index b6e10f3..f2a425b 100644 --- a/src/lib/Eo.h +++ b/src/lib/Eo.h @@ -562,8 +562,8 @@ EAPI void eo_error_set_internal(const Eo *obj, const char *file, int line); */ #define eo_add(klass, parent, ...) \ ({ \ - (void) klass; \ - eo_add_internal(klass, parent, eo_constructor(), ## __VA_ARGS__, EO_NOOP); \ + volatile const Eo_Class *_tmp_klass = klass; \ + eo_add_internal((const Eo_Class *) _tmp_klass, parent, eo_constructor(), ## __VA_ARGS__, EO_NOOP); \ }) /** @@ -576,8 +576,8 @@ EAPI void eo_error_set_internal(const Eo *obj, const char *file, int line); */ #define eo_add_custom(klass, parent, ...) \ ({ \ - (void) klass; \ - eo_add_internal(klass, parent, ## __VA_ARGS__, EO_NOOP); \ + volatile const Eo_Class *_tmp_klass = klass; \ + eo_add_internal((const Eo_Class *) _tmp_klass, parent, ## __VA_ARGS__, EO_NOOP); \ }) /** |