tasn pushed a commit to branch master.


commit 9fca3f7a147287b30482d4f7923b891bade2128f
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue May 3 09:53:43 2016 +0100

    Eo define class: Don't force EWAPI for class_get().
    Because we were forcing EWAPI in this macro, one couldn't create a class
    that is "static" or even just private or the module. The symbol was
    always exposed.
    Since in C the attributes of a function are set based on the first
    declaration, we don't need to specify any attributes in this macro and
    we can just rely on them being specified in the declaration. So for
    example, for class "foo":
    EWAPI const Eo_Class *foo_class_get(...);
    const Eo_Class *foo_class_get(...);
    Would give the desired results, a class would be EWAPI. This is already
    done automatically for all of the classes using Eolian. Because of the
    lack of specifiers, the default visibility will now be the default
    visibility based on compiler flags and settings.
    Thanks to JP for reporting this issue.
    This can potentially (but very unlikely) break things.
 src/lib/eo/Eo.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index be78f81..6152d4f 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -313,7 +313,7 @@ typedef unsigned int Eo_Op;
  * You must use this macro if you want thread safety in class creation.
 #define EO_DEFINE_CLASS(class_get_func_name, class_desc, parent_class, ...) \
-EWAPI const Eo_Class * \
+const Eo_Class * \
 class_get_func_name(void) \
 { \
    const Eo_Class *_tmp_parent_class; \


Reply via email to