summaryrefslogtreecommitdiff
path: root/legacy/eobj
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2012-08-23 12:14:07 +0000
committerTom Hacohen <tom@stosb.com>2012-08-23 12:14:07 +0000
commitfabeecd5ea8446866bf43b7c4c1ff2cf4ad0dc44 (patch)
tree0b539ca1b841eda395f61a200e75441d87e874a1 /legacy/eobj
parenta1687ca4b96161b24bf72a35f7614f4a9e2c7c4e (diff)
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. SVN revision: 75623
Diffstat (limited to 'legacy/eobj')
-rw-r--r--legacy/eobj/src/lib/Eo.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/legacy/eobj/src/lib/Eo.h b/legacy/eobj/src/lib/Eo.h
index b6e10f3c36..f2a425b0f5 100644
--- a/legacy/eobj/src/lib/Eo.h
+++ b/legacy/eobj/src/lib/Eo.h
@@ -562,8 +562,8 @@ EAPI void eo_error_set_internal(const Eo *obj, const char *file, int line);
562 */ 562 */
563#define eo_add(klass, parent, ...) \ 563#define eo_add(klass, parent, ...) \
564 ({ \ 564 ({ \
565 (void) klass; \ 565 volatile const Eo_Class *_tmp_klass = klass; \
566 eo_add_internal(klass, parent, eo_constructor(), ## __VA_ARGS__, EO_NOOP); \ 566 eo_add_internal((const Eo_Class *) _tmp_klass, parent, eo_constructor(), ## __VA_ARGS__, EO_NOOP); \
567 }) 567 })
568 568
569/** 569/**
@@ -576,8 +576,8 @@ EAPI void eo_error_set_internal(const Eo *obj, const char *file, int line);
576 */ 576 */
577#define eo_add_custom(klass, parent, ...) \ 577#define eo_add_custom(klass, parent, ...) \
578 ({ \ 578 ({ \
579 (void) klass; \ 579 volatile const Eo_Class *_tmp_klass = klass; \
580 eo_add_internal(klass, parent, ## __VA_ARGS__, EO_NOOP); \ 580 eo_add_internal((const Eo_Class *) _tmp_klass, parent, ## __VA_ARGS__, EO_NOOP); \
581 }) 581 })
582 582
583/** 583/**