Tom Hacohen
d9ceddf63a
eo2: fixed formatting.
2014-04-10 04:20:19 +01:00
Tom Hacohen
b8ae43b464
eo2: prefix all the eo2_*internal* functions with an underscore.
...
This prevents them from being auto-completed by IDEs which makes
development nicer.
2014-04-10 04:20:19 +01:00
Tom Hacohen
a588c7d99e
eo2: correctly handle eo2_do(NULL, ...).
2014-04-10 04:20:19 +01:00
Jérémy Zurcher
b08ae598a8
eo2: do not restrict search for api in class extensions to some class types
2014-04-10 04:20:19 +01:00
Jérémy Zurcher
ca1f245366
eo2: _eo2_api_desc_get can look into interfaces extensions too
2014-04-10 04:20:19 +01:00
Jérémy Zurcher
541cf25723
eo2: eo2_add_internal_end() return NULL if do_error is set
2014-04-10 04:20:19 +01:00
Jérémy Zurcher
9c1856bf82
eo2: support NULL op_descs
2014-04-10 04:20:19 +01:00
Jérémy Zurcher
11595dc40c
eo2: fix mixim elaboration
...
a mixin class must not inherit
- _eo2_api_desc_get()
accept NULL klass param
EO_CLASS_TYPE_REGULAR_NO_INSTANT is an acceptable extension class type for
- _eo2_class_funcs_set() do not shout if parent is NULL
2014-04-10 04:20:18 +01:00
Jérémy Zurcher
23e2c29298
eo2: remove EO2_CLASS_FUNC_* macros
...
there is no more difference in class or regular functions prototypes and definitions
- eo2_api_op_id_get() uses _eo_is_a_class() at runtime
- add 'void *class_data EINA_UNUSED' parameter to eo2_base class functions
- Eo2_Op_Call_Data.klass is kept only for eo2_hook_call_pre end eo2_hook_call_post,
but could be removed easily
2014-04-10 04:20:18 +01:00
Tom Hacohen
5e92ffb121
eo2: improved error messages on failed resolves.
2014-04-10 04:20:18 +01:00
Jérémy Zurcher
eb01d1c3e8
eo2: add EO2_CLASS_CLASS
2014-04-10 04:20:18 +01:00
Jérémy Zurcher
47d560b720
eo2: support composites object
...
_eo2_api_desc_get() searches extensions classes
eo2_call_resolve() searches composites objects
2014-04-10 04:20:18 +01:00
Jérémy Zurcher
2e9ae2a571
eo2: optimize eo2_call_resolve and call stack
2014-04-10 04:20:18 +01:00
Jérémy Zurcher
e51e397b89
eo2: fix eo_base_data_get(), eo_composite_attach(), eo_composite_detach()
2014-04-10 04:20:18 +01:00
Jérémy Zurcher
fc448f89af
eo2: clean up and speed up call stack usage
2014-04-10 04:20:18 +01:00
Jérémy Zurcher
4bbd97913d
eo2: eo2_add_internal_start use trash and fix MAGIC
2014-04-10 04:20:18 +01:00
Jérémy Zurcher
782092f7af
eo2: eo2_do() and eo2_do_super() supports objects and classes
2014-04-10 04:20:18 +01:00
Jérémy Zurcher
93f85f095e
eo2: rewrite eo2_do_start(...)
...
we need Eo_Class *cur_klass for eo2_do_super
be sure not to update stack pointer before we can't fail anymore
2014-04-10 04:20:18 +01:00
Jérémy Zurcher
2be91e465a
eo2: change a few variable names
...
in the EPAI, don't show that Eo* could be IDs.
in the implementation, use klass_id and obj_id
if you know or want it to be a class or an object,
use eo_id in general cases.
2014-04-10 04:20:18 +01:00
Jérémy Zurcher
c9ccc700fd
eo2: add eo2_parent_set(), eo2_parent_get(), eo2_children_iterator_new()
...
imported from eo_base_class.c as is in
a7f417e
2013-12-24 23:45:30 +0900 <Carsten Haitzler (Rasterman)>
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
796b151c27
eo2: minor fixes after huge rebase
...
indentation
use _Eo_Object * instead of _Eo *
use EO_CLASS_POINTER_RETURN_VAL(), _eo_id_get(), and _eo_class_id_get().
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
3a86881941
eo2: eo2_do_start use EO_OBJ_POINTER_ macros not _eo_obj_pointer_get
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
74f7bf3633
eo2: eo2_call_resolve_internal support undef HAVE_EO_ID
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
2af0764eeb
eo2: _eo2_api_desc_get: walks in mro not in klass->parent
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
fe23e26d0e
eo2: add DBG msg in eo2_class_funcs_set
2014-04-10 04:20:17 +01:00
Cedric Bail
8613ebe403
eo2: memset will be faster, still why not using NULL instead of -1 ?
2014-04-10 04:20:17 +01:00
Cedric Bail
0b279b600e
eo2: we can rely on LD_PRELOAD for those hook, so removing them.
2014-04-10 04:20:17 +01:00
Cedric Bail
4b97591634
eo2: add hook for beinning and start of all function execution and for all _do.
...
NOTE: I don't know what the _CLASS_FUNC are, so I may have broken stuff there.
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
bbab74320a
eo2: fix eo2 custom constructors
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
ebc90200a6
eo2: sprinkle with 'const'
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
8959832be4
eo2: fixed EO2_CLASS_FUNC_BODY and etc. functions.
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
4f73887b47
eo2: remove EO2_OP_FUNC_VIRTUAL
...
a pure virtual function is an EO2_OP_FUNC
with NULL as private function implementation pointer
2014-04-10 04:20:17 +01:00
Tom Hacohen
5f45e57b89
eo2: revert "eo2_add accepts non-defauld constructors"
...
We want to have normal functions as non-default constructors, not va_arg
ones. What we should do is split the object creation to two parts again.
The creation, the constructing (changes using the macro) and the
verification/end part that checks the constructor has been called.
This reverts commit 2ff2ce1894f173b306a896bda595e1a7768c074d.
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
7be0748b34
eo2: implement class function support
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
e82c0f6bf7
eo2: fix indent
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
42ad23c5c8
eo2: eo2_add accepts non-defauld constructors
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
2d5baec80c
eo2: call _eo2_class_funcs_set from _eo_class_constructor
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
b6991985ed
eo2: eo2_do() uses __attribute__ cleanup
...
to protect us against bad use of break, goto, return ... in eo2_do,
we use __attribute__((cleanup(eo2_do_end))) to ensure that eo2_do_end()
is called whatever.
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
adc1ac0c23
eo2: add eo2_call_stack_depth
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
eeff3e898c
eo2: EO2_CALL_STACK_SIZE -> EO2_CALL_STACK_DEPTH
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
1aa3b1536f
eo2: add virtual func support
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
13b1d03def
eo2: _eo2_api_desc_get() searches the class hierarchy
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
5febcc9ff1
eo2: oops, forgot to init desc to NULL in eo2_api_op_id_get()
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
d61a31a645
eo2: can't detect return in a eo2_do macro, *sigh*
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
9c4731f606
eo2: eo2_api_op_id_get search in parent klasses too
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
1d9d0cee9c
eo2: EO2_OP_FUNC_OVERRIDE copy doc from overriden func
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
2edd305507
eo2: set eo2_constructor and eo2_destructor chaining
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
7621758c80
eo2: use EO2_VERSION
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
c17a30dfb9
eo2: add cur_klass in call Stack and eo2_do_super
...
in eo2_do_start(), reuse previous stack fetched pointers when possible
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
68fb3d4c03
eo2: improve func overriding
...
add klass_id parameter to eo2_get_op_id()
in op descriptions, allow NULL fct pointer for virtual,
and use EO2_OP_OVERRIDE to declare overriding.
2014-04-10 04:20:16 +01:00