summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-05-02 14:17:19 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-05-02 14:17:19 +0900
commitb64a2994b3b277cbe7fce17d7ee275fd0d78c925 (patch)
tree3fd83519240da48e2355dfc6caa2415a2a77e282 /src/lib/ecore
parentaf401b408343b57ced7f98eaded1e4c59337d0aa (diff)
Revert "Efl: replace eo_data_get for objects data referencing."
This reverts commit 654a3f5f94c2464b8563d27da94a78398c112962.
Diffstat (limited to 'src/lib/ecore')
-rw-r--r--src/lib/ecore/ecore_anim.c4
-rw-r--r--src/lib/ecore/ecore_idle_enterer.c2
-rw-r--r--src/lib/ecore/ecore_idle_exiter.c2
-rw-r--r--src/lib/ecore/ecore_idler.c2
-rw-r--r--src/lib/ecore/ecore_job.c2
-rw-r--r--src/lib/ecore/ecore_poll.c2
-rw-r--r--src/lib/ecore/ecore_timer.c19
7 files changed, 13 insertions, 20 deletions
diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c
index 39cc560a5e..a3797f08b4 100644
--- a/src/lib/ecore/ecore_anim.c
+++ b/src/lib/ecore/ecore_anim.c
@@ -400,7 +400,7 @@ ecore_animator_del(Ecore_Animator *obj)
400 400
401 if (!obj) return NULL; 401 if (!obj) return NULL;
402 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); 402 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
403 Ecore_Animator_Private_Data *animator = eo_data_scope_get(obj, MY_CLASS); 403 Ecore_Animator_Private_Data *animator = eo_data_get(obj, MY_CLASS);
404 _ecore_lock(); 404 _ecore_lock();
405 405
406 if (!animator) goto unlock; 406 if (!animator) goto unlock;
@@ -570,7 +570,7 @@ static Eina_Bool
570_ecore_animator_run(void *data) 570_ecore_animator_run(void *data)
571{ 571{
572 Ecore_Animator *obj = data; 572 Ecore_Animator *obj = data;
573 Ecore_Animator_Private_Data *animator = eo_data_scope_get(obj, MY_CLASS); 573 Ecore_Animator_Private_Data *animator = eo_data_get(obj, MY_CLASS);
574 574
575 double pos = 0.0, t; 575 double pos = 0.0, t;
576 Eina_Bool run_ret; 576 Eina_Bool run_ret;
diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c
index d5753ae2a5..36ab9a6aca 100644
--- a/src/lib/ecore/ecore_idle_enterer.c
+++ b/src/lib/ecore/ecore_idle_enterer.c
@@ -174,7 +174,7 @@ ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer)
174static void * 174static void *
175_ecore_idle_enterer_del(Ecore_Idle_Enterer *obj) 175_ecore_idle_enterer_del(Ecore_Idle_Enterer *obj)
176{ 176{
177 Ecore_Idle_Enterer_Private_Data *idle_enterer = eo_data_scope_get(obj, MY_CLASS); 177 Ecore_Idle_Enterer_Private_Data *idle_enterer = eo_data_get(obj, MY_CLASS);
178 178
179 if (!idle_enterer) return NULL; 179 if (!idle_enterer) return NULL;
180 EINA_SAFETY_ON_TRUE_RETURN_VAL(idle_enterer->delete_me, NULL); 180 EINA_SAFETY_ON_TRUE_RETURN_VAL(idle_enterer->delete_me, NULL);
diff --git a/src/lib/ecore/ecore_idle_exiter.c b/src/lib/ecore/ecore_idle_exiter.c
index cf76275027..fa93d1ca2e 100644
--- a/src/lib/ecore/ecore_idle_exiter.c
+++ b/src/lib/ecore/ecore_idle_exiter.c
@@ -125,7 +125,7 @@ ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter)
125static void * 125static void *
126_ecore_idle_exiter_del(Ecore_Idle_Exiter *obj) 126_ecore_idle_exiter_del(Ecore_Idle_Exiter *obj)
127{ 127{
128 Ecore_Idle_Exiter_Private_Data *idle_exiter = eo_data_scope_get(obj, MY_CLASS); 128 Ecore_Idle_Exiter_Private_Data *idle_exiter = eo_data_get(obj, MY_CLASS);
129 EINA_SAFETY_ON_TRUE_RETURN_VAL(idle_exiter->delete_me, NULL); 129 EINA_SAFETY_ON_TRUE_RETURN_VAL(idle_exiter->delete_me, NULL);
130 idle_exiter->delete_me = 1; 130 idle_exiter->delete_me = 1;
131 idle_exiters_delete_me = 1; 131 idle_exiters_delete_me = 1;
diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c
index 0495b4edfa..0094e238e6 100644
--- a/src/lib/ecore/ecore_idler.c
+++ b/src/lib/ecore/ecore_idler.c
@@ -111,7 +111,7 @@ ecore_idler_del(Ecore_Idler *idler)
111static void * 111static void *
112_ecore_idler_del(Ecore_Idler *obj) 112_ecore_idler_del(Ecore_Idler *obj)
113{ 113{
114 Ecore_Idler_Private_Data *idler = eo_data_scope_get(obj, MY_CLASS); 114 Ecore_Idler_Private_Data *idler = eo_data_get(obj, MY_CLASS);
115 EINA_SAFETY_ON_TRUE_RETURN_VAL(idler->delete_me, NULL); 115 EINA_SAFETY_ON_TRUE_RETURN_VAL(idler->delete_me, NULL);
116 idler->delete_me = 1; 116 idler->delete_me = 1;
117 idlers_delete_me = 1; 117 idlers_delete_me = 1;
diff --git a/src/lib/ecore/ecore_job.c b/src/lib/ecore/ecore_job.c
index cfdb1d1891..e057af00e2 100644
--- a/src/lib/ecore/ecore_job.c
+++ b/src/lib/ecore/ecore_job.c
@@ -124,7 +124,7 @@ ecore_job_del(Ecore_Job *obj)
124 124
125 if (!obj) return NULL; 125 if (!obj) return NULL;
126 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); 126 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
127 Ecore_Job_Private_Data *job = eo_data_scope_get(obj, MY_CLASS); 127 Ecore_Job_Private_Data *job = eo_data_get(obj, MY_CLASS);
128 data = job->data; 128 data = job->data;
129 ecore_event_del(job->event); 129 ecore_event_del(job->event);
130 eo_parent_set(obj, NULL); 130 eo_parent_set(obj, NULL);
diff --git a/src/lib/ecore/ecore_poll.c b/src/lib/ecore/ecore_poll.c
index 886e6531cf..9057d992a7 100644
--- a/src/lib/ecore/ecore_poll.c
+++ b/src/lib/ecore/ecore_poll.c
@@ -394,7 +394,7 @@ ecore_poller_del(Ecore_Poller *obj)
394 394
395 if (!obj) return NULL; 395 if (!obj) return NULL;
396 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); 396 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
397 Ecore_Poller_Private_Data *poller = eo_data_scope_get(obj, MY_CLASS); 397 Ecore_Poller_Private_Data *poller = eo_data_get(obj, MY_CLASS);
398 /* we are walking the poller list - a bad idea to remove from it while 398 /* we are walking the poller list - a bad idea to remove from it while
399 * walking it, so just flag it as delete_me and come back to it after 399 * walking it, so just flag it as delete_me and come back to it after
400 * the loop has finished */ 400 * the loop has finished */
diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c
index 08396d6ae0..2ecd67af7e 100644
--- a/src/lib/ecore/ecore_timer.c
+++ b/src/lib/ecore/ecore_timer.c
@@ -603,7 +603,7 @@ EAPI void
603_ecore_timer_delay(Ecore_Timer *obj, 603_ecore_timer_delay(Ecore_Timer *obj,
604 double add) 604 double add)
605{ 605{
606 Ecore_Timer_Private_Data *timer = eo_data_scope_get(obj, MY_CLASS); 606 Ecore_Timer_Private_Data *timer = eo_data_get(obj, MY_CLASS);
607 607
608 if (timer->frozen) 608 if (timer->frozen)
609 { 609 {
@@ -612,7 +612,6 @@ _ecore_timer_delay(Ecore_Timer *obj,
612 else 612 else
613 { 613 {
614 timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer)); 614 timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
615 eo_data_unref(obj, timer);
616 _ecore_timer_set(obj, timer->at + add, timer->in, timer->func, timer->data); 615 _ecore_timer_set(obj, timer->at + add, timer->in, timer->func, timer->data);
617 } 616 }
618} 617}
@@ -620,13 +619,12 @@ _ecore_timer_delay(Ecore_Timer *obj,
620void * 619void *
621_ecore_timer_del(Ecore_Timer *obj) 620_ecore_timer_del(Ecore_Timer *obj)
622{ 621{
623 Ecore_Timer_Private_Data *timer = eo_data_scope_get(obj, MY_CLASS); 622 Ecore_Timer_Private_Data *timer = eo_data_get(obj, MY_CLASS);
624 623
625 if (timer->frozen && !timer->references) 624 if (timer->frozen && !timer->references)
626 { 625 {
627 void *data = timer->data; 626 void *data = timer->data;
628 627
629 eo_data_unref(obj, timer);
630 suspended = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer)); 628 suspended = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
631 629
632 if (timer->delete_me) 630 if (timer->delete_me)
@@ -670,7 +668,6 @@ _ecore_timer_shutdown(void)
670 { 668 {
671 timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timers)); 669 timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timers));
672 670
673 eo_data_unref(timer->obj, timer);
674 eo_parent_set(timer->obj, NULL); 671 eo_parent_set(timer->obj, NULL);
675 if (eo_destructed_is(timer->obj)) 672 if (eo_destructed_is(timer->obj))
676 eo_manual_free(timer->obj); 673 eo_manual_free(timer->obj);
@@ -682,7 +679,6 @@ _ecore_timer_shutdown(void)
682 { 679 {
683 suspended = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(suspended)); 680 suspended = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(suspended));
684 681
685 eo_data_unref(timer->obj, timer);
686 eo_parent_set(timer->obj, NULL); 682 eo_parent_set(timer->obj, NULL);
687 if (eo_destructed_is(timer->obj)) 683 if (eo_destructed_is(timer->obj))
688 eo_manual_free(timer->obj); 684 eo_manual_free(timer->obj);
@@ -714,7 +710,6 @@ _ecore_timer_cleanup(void)
714 } 710 }
715 timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer)); 711 timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
716 712
717 eo_data_unref(timer->obj, timer);
718 eo_parent_set(timer->obj, NULL); 713 eo_parent_set(timer->obj, NULL);
719 if (eo_destructed_is(timer->obj)) 714 if (eo_destructed_is(timer->obj))
720 eo_manual_free(timer->obj); 715 eo_manual_free(timer->obj);
@@ -739,7 +734,6 @@ _ecore_timer_cleanup(void)
739 } 734 }
740 suspended = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer)); 735 suspended = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
741 736
742 eo_data_unref(timer->obj, timer);
743 eo_parent_set(timer->obj, NULL); 737 eo_parent_set(timer->obj, NULL);
744 if (eo_destructed_is(timer->obj)) 738 if (eo_destructed_is(timer->obj))
745 eo_manual_free(timer->obj); 739 eo_manual_free(timer->obj);
@@ -800,7 +794,7 @@ static inline Ecore_Timer *
800_ecore_timer_after_get(Ecore_Timer *obj) 794_ecore_timer_after_get(Ecore_Timer *obj)
801{ 795{
802 Ecore_Timer *ret = NULL; 796 Ecore_Timer *ret = NULL;
803 Ecore_Timer_Private_Data *base = eo_data_scope_get(obj, MY_CLASS); 797 Ecore_Timer_Private_Data *base = eo_data_get(obj, MY_CLASS);
804 798
805 Ecore_Timer_Private_Data *timer = (Ecore_Timer_Private_Data *)EINA_INLIST_GET(base)->next; 799 Ecore_Timer_Private_Data *timer = (Ecore_Timer_Private_Data *)EINA_INLIST_GET(base)->next;
806 Ecore_Timer_Private_Data *valid_timer = NULL; 800 Ecore_Timer_Private_Data *valid_timer = NULL;
@@ -832,7 +826,7 @@ _ecore_timer_next_get(void)
832 second_obj = _ecore_timer_after_get(first_obj); 826 second_obj = _ecore_timer_after_get(first_obj);
833 if (second_obj) first_obj = second_obj; 827 if (second_obj) first_obj = second_obj;
834 828
835 first = eo_data_scope_get(first_obj, MY_CLASS); 829 first = eo_data_get(first_obj, MY_CLASS);
836 830
837 now = ecore_loop_time_get(); 831 now = ecore_loop_time_get();
838 in = first->at - now; 832 in = first->at - now;
@@ -844,11 +838,10 @@ static inline void
844_ecore_timer_reschedule(Ecore_Timer *obj, 838_ecore_timer_reschedule(Ecore_Timer *obj,
845 double when) 839 double when)
846{ 840{
847 Ecore_Timer_Private_Data *timer = eo_data_scope_get(obj, MY_CLASS); 841 Ecore_Timer_Private_Data *timer = eo_data_get(obj, MY_CLASS);
848 if ((timer->delete_me) || (timer->frozen)) return; 842 if ((timer->delete_me) || (timer->frozen)) return;
849 843
850 timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer)); 844 timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
851 eo_data_unref(obj, timer);
852 845
853 /* if the timer would have gone off more than 15 seconds ago, 846 /* if the timer would have gone off more than 15 seconds ago,
854 * assume that the system hung and set the timer to go off 847 * assume that the system hung and set the timer to go off
@@ -939,7 +932,7 @@ _ecore_timer_set(Ecore_Timer *obj,
939{ 932{
940 Ecore_Timer_Private_Data *t2; 933 Ecore_Timer_Private_Data *t2;
941 934
942 Ecore_Timer_Private_Data *timer = eo_data_ref(obj, MY_CLASS); 935 Ecore_Timer_Private_Data *timer = eo_data_get(obj, MY_CLASS);
943 936
944 timers_added = 1; 937 timers_added = 1;
945 timer->at = at; 938 timer->at = at;