tasn pushed a commit to branch master.
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
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
@@ -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 * \
const Eo_Class *_tmp_parent_class; \