summaryrefslogtreecommitdiff
path: root/legacy/eobj/src/tests/mixin/inherit.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2012-07-31 07:15:33 +0000
committerTom Hacohen <tom@stosb.com>2012-07-31 07:15:33 +0000
commit7595ce698daf995914ea80d8fbe0a2c9096559ab (patch)
tree6fce15226248ca2b80b36caf40b75c3e91170df9 /legacy/eobj/src/tests/mixin/inherit.c
parent2aa4cd4bd52d48269d7b2d3392393fd51cc9b22f (diff)
Eo: Fixed an issue with mixins and super calls.
SVN revision: 74617
Diffstat (limited to 'legacy/eobj/src/tests/mixin/inherit.c')
-rw-r--r--legacy/eobj/src/tests/mixin/inherit.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/legacy/eobj/src/tests/mixin/inherit.c b/legacy/eobj/src/tests/mixin/inherit.c
new file mode 100644
index 0000000000..53c8826953
--- /dev/null
+++ b/legacy/eobj/src/tests/mixin/inherit.c
@@ -0,0 +1,38 @@
1#include "Eo.h"
2#include "inherit.h"
3
4#include "config.h"
5
6#define MY_CLASS INHERIT_CLASS
7
8static void
9_a_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list)
10{
11 int *name = va_arg(*list, int *);
12 eo_do_super(obj, simple_a_get(name));
13 printf("%s\n", __func__);
14}
15
16static void
17_class_constructor(Eo_Class *klass)
18{
19 const Eo_Op_Func_Description func_desc[] = {
20 EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
21 EO_OP_FUNC_SENTINEL
22 };
23
24 eo_class_funcs_set(klass, func_desc);
25}
26
27static const Eo_Class_Description class_desc = {
28 EO_VERSION,
29 "Inherit",
30 EO_CLASS_TYPE_REGULAR,
31 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
32 NULL,
33 0,
34 _class_constructor,
35 NULL
36};
37
38EO_DEFINE_CLASS(inherit_class_get, &class_desc, SIMPLE_CLASS, MIXIN4_CLASS, NULL);