forked from enlightenment/efl
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": foo.h: EWAPI const Eo_Class *foo_class_get(...); foo.c: 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.
This commit is contained in:
parent
2e68debe7b
commit
9fca3f7a14
|
@ -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; \
|
||||
|
|
Loading…
Reference in New Issue