Eobj: s/__UNUSED__/EINA_UNUSED/ I had no idea that exists.
[profile/ivi/eobj.git] / examples / constructors / simple6.c
1 #include "Eobj.h"
2 #include "mixin.h"
3 #include "simple6.h"
4
5 #include "config.h"
6
7 static const Eobj_Class *_my_class = NULL;
8
9 static void
10 _destructor(Eobj *obj, void *class_data EINA_UNUSED)
11 {
12    eobj_constructor_super(obj);
13
14    eobj_constructor_error_set(obj);
15 }
16
17 const Eobj_Class *
18 simple6_class_get(void)
19 {
20    if (_my_class) return _my_class;
21
22    static const Eobj_Class_Description class_desc = {
23         "Simple6",
24         EOBJ_CLASS_TYPE_REGULAR,
25         EOBJ_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
26         NULL,
27         0,
28         NULL,
29         _destructor,
30         NULL,
31         NULL
32    };
33
34    _my_class = eobj_class_new(&class_desc, EOBJ_BASE_CLASS, NULL);
35    return _my_class;
36 }