summaryrefslogtreecommitdiff
path: root/src/lib/eo/eo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eo/eo.c')
-rw-r--r--src/lib/eo/eo.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index ba12fbd252..03771cfdeb 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -13,6 +13,7 @@
#include "Eo.h"
#include "eo_ptr_indirection.h"
#include "eo_private.h"
+#include "eo_add_fallback.h"
#define EO_CLASS_IDS_FIRST 1
#define EO_OP_IDS_FIRST 1
@@ -615,9 +616,16 @@ _eo_class_funcs_set(_Eo_Class *klass)
}
EAPI Eo *
-_eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo *parent_id, Eina_Bool ref)
+_eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo *parent_id, Eina_Bool ref, Eina_Bool is_fallback)
{
_Eo_Object *obj;
+ Eo_Call_Stack *stack = NULL;
+
+ if (is_fallback)
+ {
+ stack->frame_ptr++;
+ stack->frame_ptr->obj = NULL;
+ }
EO_CLASS_POINTER_RETURN_VAL(klass_id, klass, NULL);
@@ -680,6 +688,11 @@ _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo
return NULL;
}
+ if (is_fallback)
+ {
+ stack->frame_ptr->obj = eo_id;
+ }
+
return eo_id;
}
@@ -726,11 +739,17 @@ cleanup:
}
EAPI Eo *
-_eo_add_end(Eo *eo_id)
+_eo_add_end(Eo *eo_id, Eina_Bool is_fallback)
{
Eo *ret = eo_finalize(eo_id);
ret = _eo_add_internal_end(eo_id, ret);
+ if (is_fallback)
+ {
+ Eo_Call_Stack *stack = _eo_add_fallback_stack_get();
+ stack->frame_ptr--;
+ }
+
return ret;
}
@@ -1595,6 +1614,8 @@ eo_init(void)
_eo_class_isa_func(NULL, NULL, NULL);
#endif
+ _eo_add_fallback_init();
+
eina_log_timing(_eo_log_dom,
EINA_LOG_STATE_STOP,
EINA_LOG_STATE_INIT);
@@ -1618,6 +1639,8 @@ eo_shutdown(void)
EINA_LOG_STATE_START,
EINA_LOG_STATE_SHUTDOWN);
+ _eo_add_fallback_shutdown();
+
for (i = 0 ; i < _eo_classes_last_id ; i++, cls_itr++)
{
if (*cls_itr)