summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-11-08 09:30:42 +0000
committerAndy Williams <andy@andywilliams.me>2017-11-08 09:30:42 +0000
commitd5dbcdabd14c1ddf01f22b4865487ecce272c055 (patch)
tree16b46d4b5ddac556387f3c0bbf6c366e23c67628
parent2a5267d416688948cc260e7d8924d9f6c2ec1c53 (diff)
eo: Rename efl_ref_get to efl_ref_count
-rw-r--r--src/bindings/cxx/eo_cxx/eo_ops.hh2
-rw-r--r--src/lib/ecore/efl_io_copier.c6
-rw-r--r--src/lib/ecore_con/efl_net_dialer_http.c2
-rw-r--r--src/lib/ecore_con/efl_net_server_fd.c2
-rw-r--r--src/lib/ecore_con/efl_net_server_simple.c2
-rw-r--r--src/lib/ecore_con/efl_net_server_ssl.c2
-rw-r--r--src/lib/ecore_con/efl_net_server_windows.c2
-rw-r--r--src/lib/eio/eio_model.c2
-rw-r--r--src/lib/elementary/elm_atspi_bridge.c2
-rw-r--r--src/lib/eo/Eo.h8
-rw-r--r--src/lib/eo/eo.c4
-rw-r--r--src/lib/evas/canvas/evas_main.c12
-rw-r--r--src/tests/elementary/elm_test_win.c4
-rw-r--r--src/tests/eo/suite/eo_test_general.c88
14 files changed, 69 insertions, 69 deletions
diff --git a/src/bindings/cxx/eo_cxx/eo_ops.hh b/src/bindings/cxx/eo_cxx/eo_ops.hh
index 8d385fd212..1f08d8d738 100644
--- a/src/bindings/cxx/eo_cxx/eo_ops.hh
+++ b/src/bindings/cxx/eo_cxx/eo_ops.hh
@@ -42,7 +42,7 @@ unref(const Eo *obj)
42inline int 42inline int
43ref_get(const Eo *obj) 43ref_get(const Eo *obj)
44{ 44{
45 return ::efl_ref_get(obj); 45 return ::efl_ref_count(obj);
46} 46}
47 47
48inline Eina_Bool 48inline Eina_Bool
diff --git a/src/lib/ecore/efl_io_copier.c b/src/lib/ecore/efl_io_copier.c
index dc4d1e17dd..e9d7d2313b 100644
--- a/src/lib/ecore/efl_io_copier.c
+++ b/src/lib/ecore/efl_io_copier.c
@@ -42,7 +42,7 @@ static void _efl_io_copier_read(Eo *o, Efl_Io_Copier_Data *pd);
42 DBG("copier={%p %s, refs=%d, closed=%d, done=%d, buf=%zd}", \ 42 DBG("copier={%p %s, refs=%d, closed=%d, done=%d, buf=%zd}", \
43 o, \ 43 o, \
44 efl_class_name_get(efl_class_get(o)), \ 44 efl_class_name_get(efl_class_get(o)), \
45 efl_ref_get(o), \ 45 efl_ref_count(o), \
46 efl_io_closer_closed_get(o), \ 46 efl_io_closer_closed_get(o), \
47 pd->done, \ 47 pd->done, \
48 pd->buf ? eina_binbuf_length_get(pd->buf): 0); \ 48 pd->buf ? eina_binbuf_length_get(pd->buf): 0); \
@@ -52,7 +52,7 @@ static void _efl_io_copier_read(Eo *o, Efl_Io_Copier_Data *pd);
52 DBG("source={%p %s, refs=%d, can_read=%d, eos=%d, closed=%d}", \ 52 DBG("source={%p %s, refs=%d, can_read=%d, eos=%d, closed=%d}", \
53 pd->source, \ 53 pd->source, \
54 efl_class_name_get(efl_class_get(pd->source)), \ 54 efl_class_name_get(efl_class_get(pd->source)), \
55 efl_ref_get(pd->source), \ 55 efl_ref_count(pd->source), \
56 efl_io_reader_can_read_get(pd->source), \ 56 efl_io_reader_can_read_get(pd->source), \
57 efl_io_reader_eos_get(pd->source), \ 57 efl_io_reader_eos_get(pd->source), \
58 efl_isa(pd->source, EFL_IO_CLOSER_MIXIN) ? \ 58 efl_isa(pd->source, EFL_IO_CLOSER_MIXIN) ? \
@@ -63,7 +63,7 @@ static void _efl_io_copier_read(Eo *o, Efl_Io_Copier_Data *pd);
63 DBG("destination={%p %s, refs=%d, can_write=%d, closed=%d}", \ 63 DBG("destination={%p %s, refs=%d, can_write=%d, closed=%d}", \
64 pd->destination, \ 64 pd->destination, \
65 efl_class_name_get(efl_class_get(pd->destination)), \ 65 efl_class_name_get(efl_class_get(pd->destination)), \
66 efl_ref_get(pd->destination), \ 66 efl_ref_count(pd->destination), \
67 efl_io_writer_can_write_get(pd->destination), \ 67 efl_io_writer_can_write_get(pd->destination), \
68 efl_isa(pd->destination, EFL_IO_CLOSER_MIXIN) ? \ 68 efl_isa(pd->destination, EFL_IO_CLOSER_MIXIN) ? \
69 efl_io_closer_closed_get(pd->destination) : 0); \ 69 efl_io_closer_closed_get(pd->destination) : 0); \
diff --git a/src/lib/ecore_con/efl_net_dialer_http.c b/src/lib/ecore_con/efl_net_dialer_http.c
index cbc3e033e8..d553bad134 100644
--- a/src/lib/ecore_con/efl_net_dialer_http.c
+++ b/src/lib/ecore_con/efl_net_dialer_http.c
@@ -820,7 +820,7 @@ _efl_net_dialer_http_curl_safe_end(Eo *o, Efl_Net_Dialer_Http_Data *pd, CURL *ea
820 Eina_Future *f; 820 Eina_Future *f;
821 int refs; 821 int refs;
822 822
823 refs = efl_ref_get(o); 823 refs = efl_ref_count(o);
824 if (refs >= 2) 824 if (refs >= 2)
825 { 825 {
826 pd->in_curl_callback--; 826 pd->in_curl_callback--;
diff --git a/src/lib/ecore_con/efl_net_server_fd.c b/src/lib/ecore_con/efl_net_server_fd.c
index c04b6c2186..5fede8d0f7 100644
--- a/src/lib/ecore_con/efl_net_server_fd.c
+++ b/src/lib/ecore_con/efl_net_server_fd.c
@@ -513,7 +513,7 @@ _efl_net_server_fd_efl_net_server_client_announce(Eo *o, Efl_Net_Server_Fd_Data
513 return EINA_TRUE; 513 return EINA_TRUE;
514 } 514 }
515 515
516 if (efl_ref_get(client) == 1) /* users must take a reference themselves */ 516 if (efl_ref_count(client) == 1) /* users must take a reference themselves */
517 { 517 {
518 DBG("client %s was not handled, closing it...", 518 DBG("client %s was not handled, closing it...",
519 efl_net_socket_address_remote_get(client)); 519 efl_net_socket_address_remote_get(client));
diff --git a/src/lib/ecore_con/efl_net_server_simple.c b/src/lib/ecore_con/efl_net_server_simple.c
index 0dba2f6a83..479948b2e0 100644
--- a/src/lib/ecore_con/efl_net_server_simple.c
+++ b/src/lib/ecore_con/efl_net_server_simple.c
@@ -46,7 +46,7 @@ _efl_net_server_simple_efl_net_server_client_announce(Eo *o, Efl_Net_Server_Simp
46 return EINA_TRUE; 46 return EINA_TRUE;
47 } 47 }
48 48
49 if (efl_ref_get(client) == 1) /* users must take a reference themselves */ 49 if (efl_ref_count(client) == 1) /* users must take a reference themselves */
50 { 50 {
51 DBG("client %s was not handled, closing it...", 51 DBG("client %s was not handled, closing it...",
52 efl_net_socket_address_remote_get(client)); 52 efl_net_socket_address_remote_get(client));
diff --git a/src/lib/ecore_con/efl_net_server_ssl.c b/src/lib/ecore_con/efl_net_server_ssl.c
index d9b8953143..0cf56cf8e8 100644
--- a/src/lib/ecore_con/efl_net_server_ssl.c
+++ b/src/lib/ecore_con/efl_net_server_ssl.c
@@ -49,7 +49,7 @@ _efl_net_server_ssl_efl_net_server_client_announce(Eo *o, Efl_Net_Server_Ssl_Dat
49 return EINA_TRUE; 49 return EINA_TRUE;
50 } 50 }
51 51
52 if (efl_ref_get(client) == 1) /* users must take a reference themselves */ 52 if (efl_ref_count(client) == 1) /* users must take a reference themselves */
53 { 53 {
54 DBG("client %s was not handled, closing it...", 54 DBG("client %s was not handled, closing it...",
55 efl_net_socket_address_remote_get(client)); 55 efl_net_socket_address_remote_get(client));
diff --git a/src/lib/ecore_con/efl_net_server_windows.c b/src/lib/ecore_con/efl_net_server_windows.c
index f964d93808..76dd5b0ace 100644
--- a/src/lib/ecore_con/efl_net_server_windows.c
+++ b/src/lib/ecore_con/efl_net_server_windows.c
@@ -446,7 +446,7 @@ _efl_net_server_windows_efl_net_server_client_announce(Eo *o, Efl_Net_Server_Win
446 return EINA_TRUE; 446 return EINA_TRUE;
447 } 447 }
448 448
449 if (efl_ref_get(client) == 1) /* users must take a reference themselves */ 449 if (efl_ref_count(client) == 1) /* users must take a reference themselves */
450 { 450 {
451 DBG("client %s was not handled, closing it...", 451 DBG("client %s was not handled, closing it...",
452 efl_net_socket_address_remote_get(client)); 452 efl_net_socket_address_remote_get(client));
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index 26f7696800..e9b6bfb85a 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -90,7 +90,7 @@ _eio_move_done_cb(void *data, Eio_File *handler EINA_UNUSED)
90 Eio_Model_Data *priv = data; 90 Eio_Model_Data *priv = data;
91 Eina_Array *properties; 91 Eina_Array *properties;
92 92
93 EINA_SAFETY_ON_FALSE_RETURN(efl_ref_get(priv->obj)); 93 EINA_SAFETY_ON_FALSE_RETURN(efl_ref_count(priv->obj));
94 properties = eina_array_new(20); 94 properties = eina_array_new(20);
95 95
96 memset(&evt, 0, sizeof(Efl_Model_Property_Event)); 96 memset(&evt, 0, sizeof(Efl_Model_Property_Event));
diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c
index c8681932e5..1cf11a9186 100644
--- a/src/lib/elementary/elm_atspi_bridge.c
+++ b/src/lib/elementary/elm_atspi_bridge.c
@@ -3145,7 +3145,7 @@ _iter_interfaces_append(Eldbus_Message_Iter *iter, const Eo *obj)
3145static Eina_Bool 3145static Eina_Bool
3146_cache_item_reference_append_cb(Eo *bridge, Eo *data, Eldbus_Message_Iter *iter_array) 3146_cache_item_reference_append_cb(Eo *bridge, Eo *data, Eldbus_Message_Iter *iter_array)
3147{ 3147{
3148 if (!efl_ref_get(data) || efl_destructed_is(data)) 3148 if (!efl_ref_count(data) || efl_destructed_is(data))
3149 return EINA_TRUE; 3149 return EINA_TRUE;
3150 3150
3151 Eldbus_Message_Iter *iter_struct, *iter_sub_array; 3151 Eldbus_Message_Iter *iter_struct, *iter_sub_array;
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 002d648b98..7c4942868b 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -1607,7 +1607,7 @@ EAPI void efl_data_xunref_internal(const Eo *obj, void *data, const Eo *ref_obj)
1607 * what you are doing. 1607 * what you are doing.
1608 * 1608 *
1609 * @see efl_unref() 1609 * @see efl_unref()
1610 * @see efl_ref_get() 1610 * @see efl_ref_count()
1611 */ 1611 */
1612EAPI Eo *efl_ref(const Eo *obj); 1612EAPI Eo *efl_ref(const Eo *obj);
1613 1613
@@ -1616,7 +1616,7 @@ EAPI Eo *efl_ref(const Eo *obj);
1616 * @param obj the object to work on. 1616 * @param obj the object to work on.
1617 * 1617 *
1618 * @see efl_ref() 1618 * @see efl_ref()
1619 * @see efl_ref_get() 1619 * @see efl_ref_count()
1620 */ 1620 */
1621EAPI void efl_unref(const Eo *obj); 1621EAPI void efl_unref(const Eo *obj);
1622 1622
@@ -1628,7 +1628,7 @@ EAPI void efl_unref(const Eo *obj);
1628 * @see efl_ref() 1628 * @see efl_ref()
1629 * @see efl_unref() 1629 * @see efl_unref()
1630 */ 1630 */
1631EAPI int efl_ref_get(const Eo *obj); 1631EAPI int efl_ref_count(const Eo *obj);
1632 1632
1633/** 1633/**
1634 * @brief Set a deletion interceptor function 1634 * @brief Set a deletion interceptor function
@@ -2140,7 +2140,7 @@ EAPI Eina_Iterator *eo_objects_iterator_new(void);
2140 2140
2141 2141
2142 /* Private for EFL internal use only. Do not use these! */ 2142 /* Private for EFL internal use only. Do not use these! */
2143EAPI int ___efl_ref2_get(const Eo *obj_id); 2143EAPI int ___efl_ref2_count(const Eo *obj_id);
2144EAPI void ___efl_ref2_reset(const Eo *obj_id); 2144EAPI void ___efl_ref2_reset(const Eo *obj_id);
2145 2145
2146#endif 2146#endif
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 2cf9cabe6b..17595e055e 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1904,7 +1904,7 @@ efl_unref(const Eo *obj_id)
1904} 1904}
1905 1905
1906EAPI int 1906EAPI int
1907efl_ref_get(const Eo *obj_id) 1907efl_ref_count(const Eo *obj_id)
1908{ 1908{
1909 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, 0); 1909 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, 0);
1910 int ref; 1910 int ref;
@@ -1914,7 +1914,7 @@ efl_ref_get(const Eo *obj_id)
1914} 1914}
1915 1915
1916EAPI int 1916EAPI int
1917___efl_ref2_get(const Eo *obj_id) 1917___efl_ref2_count(const Eo *obj_id)
1918{ 1918{
1919 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, 0); 1919 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, 0);
1920 int ref; 1920 int ref;
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index f6480e41aa..dff563f195 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -321,12 +321,12 @@ _evas_canvas_efl_object_destructor(Eo *eo_e, Evas_Public_Data *e)
321 { 321 {
322 if (!o->delete_me) 322 if (!o->delete_me)
323 { 323 {
324 if ((o->ref > 0) || (efl_ref_get(o->object) > 0)) 324 if ((o->ref > 0) || (efl_ref_count(o->object) > 0))
325 { 325 {
326 ERR("obj(%s) ref count(%d) is bigger than 0. This " 326 ERR("obj(%s) ref count(%d) is bigger than 0. This "
327 "object couldn't be deleted", 327 "object couldn't be deleted",
328 efl_debug_name_get(o->object), 328 efl_debug_name_get(o->object),
329 efl_ref_get(o->object)); 329 efl_ref_count(o->object));
330 continue; 330 continue;
331 } 331 }
332 unrefs = eina_list_append(unrefs, o->object); 332 unrefs = eina_list_append(unrefs, o->object);
@@ -342,10 +342,10 @@ _evas_canvas_efl_object_destructor(Eo *eo_e, Evas_Public_Data *e)
342 EINA_LIST_FREE(unrefs, eo_obj) 342 EINA_LIST_FREE(unrefs, eo_obj)
343 { 343 {
344 ERR("Killing Zombie Object [%s]. Refs: %i:%i", 344 ERR("Killing Zombie Object [%s]. Refs: %i:%i",
345 efl_debug_name_get(eo_obj), efl_ref_get(eo_obj), ___efl_ref2_get(eo_obj)); 345 efl_debug_name_get(eo_obj), efl_ref_count(eo_obj), ___efl_ref2_count(eo_obj));
346 ___efl_ref2_reset(eo_obj); 346 ___efl_ref2_reset(eo_obj);
347 while (efl_ref_get(eo_obj) > 1) efl_unref(eo_obj); 347 while (efl_ref_count(eo_obj) > 1) efl_unref(eo_obj);
348 while (efl_ref_get(eo_obj) < 1) efl_ref(eo_obj); 348 while (efl_ref_count(eo_obj) < 1) efl_ref(eo_obj);
349 efl_del(eo_obj); 349 efl_del(eo_obj);
350 350
351 if (!detach_zombies) continue; 351 if (!detach_zombies) continue;
@@ -359,7 +359,7 @@ _evas_canvas_efl_object_destructor(Eo *eo_e, Evas_Public_Data *e)
359 "was deleted but the call to efl_destructor() " 359 "was deleted but the call to efl_destructor() "
360 "was not propagated to all the parent classes? " 360 "was not propagated to all the parent classes? "
361 "Forcibly removing it. This may leak! Refs: %i:%i", 361 "Forcibly removing it. This may leak! Refs: %i:%i",
362 efl_debug_name_get(eo_obj), efl_ref_get(eo_obj), ___efl_ref2_get(eo_obj)); 362 efl_debug_name_get(eo_obj), efl_ref_count(eo_obj), ___efl_ref2_count(eo_obj));
363 lay->objects = (Evas_Object_Protected_Data *) 363 lay->objects = (Evas_Object_Protected_Data *)
364 eina_inlist_remove(EINA_INLIST_GET(lay->objects), EINA_INLIST_GET(o)); 364 eina_inlist_remove(EINA_INLIST_GET(lay->objects), EINA_INLIST_GET(o));
365 goto next_zombie; 365 goto next_zombie;
diff --git a/src/tests/elementary/elm_test_win.c b/src/tests/elementary/elm_test_win.c
index 7248e19346..7effdefe09 100644
--- a/src/tests/elementary/elm_test_win.c
+++ b/src/tests/elementary/elm_test_win.c
@@ -161,7 +161,7 @@ START_TEST (elm_win_policy_quit_last_window_hidden)
161 visible = efl_gfx_visible_get(win); 161 visible = efl_gfx_visible_get(win);
162 162
163 ck_assert(fail_flag == EINA_FALSE); 163 ck_assert(fail_flag == EINA_FALSE);
164 ck_assert(efl_ref_get(win) >= 1); 164 ck_assert(efl_ref_count(win) >= 1);
165 ck_assert(visible == EINA_FALSE); 165 ck_assert(visible == EINA_FALSE);
166 166
167 elm_shutdown(); 167 elm_shutdown();
@@ -188,7 +188,7 @@ START_TEST (elm_win_autohide_and_policy_quit_last_window_hidden)
188 visible = efl_gfx_visible_get(win); 188 visible = efl_gfx_visible_get(win);
189 189
190 ck_assert(fail_flag == EINA_FALSE); 190 ck_assert(fail_flag == EINA_FALSE);
191 ck_assert(efl_ref_get(win) >= 1); 191 ck_assert(efl_ref_count(win) >= 1);
192 ck_assert(visible == EINA_FALSE); 192 ck_assert(visible == EINA_FALSE);
193 193
194 elm_shutdown(); 194 elm_shutdown();
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index 3c21e71c14..2a26bf8dd1 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -575,27 +575,27 @@ START_TEST(efl_refs)
575 Eo *obj3 = efl_add(SIMPLE_CLASS, NULL); 575 Eo *obj3 = efl_add(SIMPLE_CLASS, NULL);
576 576
577 efl_xref(obj, obj2); 577 efl_xref(obj, obj2);
578 fail_if(efl_ref_get(obj) != 2); 578 fail_if(efl_ref_count(obj) != 2);
579 efl_xref(obj, obj3); 579 efl_xref(obj, obj3);
580 fail_if(efl_ref_get(obj) != 3); 580 fail_if(efl_ref_count(obj) != 3);
581 581
582 efl_xunref(obj, obj2); 582 efl_xunref(obj, obj2);
583 fail_if(efl_ref_get(obj) != 2); 583 fail_if(efl_ref_count(obj) != 2);
584 efl_xunref(obj, obj3); 584 efl_xunref(obj, obj3);
585 fail_if(efl_ref_get(obj) != 1); 585 fail_if(efl_ref_count(obj) != 1);
586 586
587#ifdef EO_DEBUG 587#ifdef EO_DEBUG
588 efl_xunref(obj, obj3); 588 efl_xunref(obj, obj3);
589 fail_if(efl_ref_get(obj) != 1); 589 fail_if(efl_ref_count(obj) != 1);
590 590
591 efl_xref(obj, obj2); 591 efl_xref(obj, obj2);
592 fail_if(efl_ref_get(obj) != 2); 592 fail_if(efl_ref_count(obj) != 2);
593 593
594 efl_xunref(obj, obj3); 594 efl_xunref(obj, obj3);
595 fail_if(efl_ref_get(obj) != 2); 595 fail_if(efl_ref_count(obj) != 2);
596 596
597 efl_xunref(obj, obj2); 597 efl_xunref(obj, obj2);
598 fail_if(efl_ref_get(obj) != 1); 598 fail_if(efl_ref_count(obj) != 1);
599#endif 599#endif
600 600
601 /* Check we don't seg if there's an extra xref. */ 601 /* Check we don't seg if there's an extra xref. */
@@ -627,9 +627,9 @@ START_TEST(efl_refs)
627 obj2 = efl_add(SIMPLE_CLASS, obj); 627 obj2 = efl_add(SIMPLE_CLASS, obj);
628 obj3 = efl_add_ref(SIMPLE_CLASS, obj); 628 obj3 = efl_add_ref(SIMPLE_CLASS, obj);
629 629
630 ck_assert_int_eq(efl_ref_get(obj), 1); 630 ck_assert_int_eq(efl_ref_count(obj), 1);
631 ck_assert_int_eq(efl_ref_get(obj2), 1); 631 ck_assert_int_eq(efl_ref_count(obj2), 1);
632 ck_assert_int_eq(efl_ref_get(obj3), 2); 632 ck_assert_int_eq(efl_ref_count(obj3), 2);
633 633
634 efl_del(obj); 634 efl_del(obj);
635 efl_del(obj2); 635 efl_del(obj2);
@@ -643,18 +643,18 @@ START_TEST(efl_refs)
643 643
644 efl_parent_set(obj2, obj3); 644 efl_parent_set(obj2, obj3);
645 efl_parent_set(obj3, obj); 645 efl_parent_set(obj3, obj);
646 ck_assert_int_eq(efl_ref_get(obj2), 2); 646 ck_assert_int_eq(efl_ref_count(obj2), 2);
647 ck_assert_int_eq(efl_ref_get(obj3), 2); 647 ck_assert_int_eq(efl_ref_count(obj3), 2);
648 648
649 efl_parent_set(obj2, NULL); 649 efl_parent_set(obj2, NULL);
650 efl_parent_set(obj3, NULL); 650 efl_parent_set(obj3, NULL);
651 ck_assert_int_eq(efl_ref_get(obj2), 1); 651 ck_assert_int_eq(efl_ref_count(obj2), 1);
652 ck_assert_int_eq(efl_ref_get(obj3), 1); 652 ck_assert_int_eq(efl_ref_count(obj3), 1);
653 653
654 efl_parent_set(obj2, obj); 654 efl_parent_set(obj2, obj);
655 efl_parent_set(obj3, obj); 655 efl_parent_set(obj3, obj);
656 ck_assert_int_eq(efl_ref_get(obj2), 2); 656 ck_assert_int_eq(efl_ref_count(obj2), 2);
657 ck_assert_int_eq(efl_ref_get(obj3), 2); 657 ck_assert_int_eq(efl_ref_count(obj3), 2);
658 658
659 efl_del(obj); 659 efl_del(obj);
660 efl_del(obj2); 660 efl_del(obj2);
@@ -665,23 +665,23 @@ START_TEST(efl_refs)
665 obj2 = efl_add_ref(SIMPLE_CLASS, obj); 665 obj2 = efl_add_ref(SIMPLE_CLASS, obj);
666 obj3 = efl_add_ref(SIMPLE_CLASS, NULL); 666 obj3 = efl_add_ref(SIMPLE_CLASS, NULL);
667 667
668 ck_assert_int_eq(efl_ref_get(obj2), 2); 668 ck_assert_int_eq(efl_ref_count(obj2), 2);
669 ck_assert_int_eq(efl_ref_get(obj3), 1); 669 ck_assert_int_eq(efl_ref_count(obj3), 1);
670 670
671 efl_parent_set(obj2, obj3); 671 efl_parent_set(obj2, obj3);
672 efl_parent_set(obj3, obj); 672 efl_parent_set(obj3, obj);
673 ck_assert_int_eq(efl_ref_get(obj2), 2); 673 ck_assert_int_eq(efl_ref_count(obj2), 2);
674 ck_assert_int_eq(efl_ref_get(obj3), 2); 674 ck_assert_int_eq(efl_ref_count(obj3), 2);
675 675
676 efl_parent_set(obj2, NULL); 676 efl_parent_set(obj2, NULL);
677 efl_parent_set(obj3, NULL); 677 efl_parent_set(obj3, NULL);
678 ck_assert_int_eq(efl_ref_get(obj2), 1); 678 ck_assert_int_eq(efl_ref_count(obj2), 1);
679 ck_assert_int_eq(efl_ref_get(obj3), 1); 679 ck_assert_int_eq(efl_ref_count(obj3), 1);
680 680
681 efl_parent_set(obj2, obj); 681 efl_parent_set(obj2, obj);
682 efl_parent_set(obj3, obj); 682 efl_parent_set(obj3, obj);
683 ck_assert_int_eq(efl_ref_get(obj2), 2); 683 ck_assert_int_eq(efl_ref_count(obj2), 2);
684 ck_assert_int_eq(efl_ref_get(obj3), 2); 684 ck_assert_int_eq(efl_ref_count(obj3), 2);
685 685
686 efl_del(obj); 686 efl_del(obj);
687 efl_del(obj2); 687 efl_del(obj2);
@@ -829,10 +829,10 @@ START_TEST(eo_generic_data)
829 fail_if(objtmp); 829 fail_if(objtmp);
830 830
831 efl_key_ref_set(obj, "test1", obj2); 831 efl_key_ref_set(obj, "test1", obj2);
832 fail_if(efl_ref_get(obj2) != 2); 832 fail_if(efl_ref_count(obj2) != 2);
833 833
834 efl_key_ref_set(obj, "test2", obj3); 834 efl_key_ref_set(obj, "test2", obj3);
835 fail_if(efl_ref_get(obj3) != 2); 835 fail_if(efl_ref_count(obj3) != 2);
836 836
837 objtmp = efl_key_ref_get(obj, "test1"); 837 objtmp = efl_key_ref_get(obj, "test1");
838 fail_if(obj2 != objtmp); 838 fail_if(obj2 != objtmp);
@@ -844,7 +844,7 @@ START_TEST(eo_generic_data)
844 fail_if(obj3 != objtmp); 844 fail_if(obj3 != objtmp);
845 845
846 efl_key_ref_set(obj, "test2", NULL); 846 efl_key_ref_set(obj, "test2", NULL);
847 fail_if(efl_ref_get(obj3) != 1); 847 fail_if(efl_ref_count(obj3) != 1);
848 848
849 objtmp = efl_key_ref_get(obj, "test2"); 849 objtmp = efl_key_ref_get(obj, "test2");
850 fail_if(objtmp); 850 fail_if(objtmp);
@@ -853,7 +853,7 @@ START_TEST(eo_generic_data)
853 fail_if(obj2 != objtmp); 853 fail_if(obj2 != objtmp);
854 854
855 efl_key_ref_set(obj, "test1", NULL); 855 efl_key_ref_set(obj, "test1", NULL);
856 fail_if(efl_ref_get(obj2) != 1); 856 fail_if(efl_ref_count(obj2) != 1);
857 857
858 objtmp = efl_key_ref_get(obj, "test1"); 858 objtmp = efl_key_ref_get(obj, "test1");
859 fail_if(objtmp); 859 fail_if(objtmp);
@@ -884,10 +884,10 @@ START_TEST(eo_generic_data)
884 fail_if(objtmp); 884 fail_if(objtmp);
885 885
886 efl_key_wref_set(obj, "test1", obj2); 886 efl_key_wref_set(obj, "test1", obj2);
887 fail_if(efl_ref_get(obj2) != 1); 887 fail_if(efl_ref_count(obj2) != 1);
888 888
889 efl_key_wref_set(obj, "test2", obj3); 889 efl_key_wref_set(obj, "test2", obj3);
890 fail_if(efl_ref_get(obj3) != 1); 890 fail_if(efl_ref_count(obj3) != 1);
891 891
892 objtmp = efl_key_wref_get(obj, "test1"); 892 objtmp = efl_key_wref_get(obj, "test1");
893 fail_if(obj2 != objtmp); 893 fail_if(obj2 != objtmp);
@@ -899,7 +899,7 @@ START_TEST(eo_generic_data)
899 fail_if(obj3 != objtmp); 899 fail_if(obj3 != objtmp);
900 900
901 efl_key_wref_set(obj, "test2", NULL); 901 efl_key_wref_set(obj, "test2", NULL);
902 fail_if(efl_ref_get(obj3) != 1); 902 fail_if(efl_ref_count(obj3) != 1);
903 903
904 objtmp = efl_key_wref_get(obj, "test2"); 904 objtmp = efl_key_wref_get(obj, "test2");
905 fail_if(objtmp); 905 fail_if(objtmp);
@@ -908,7 +908,7 @@ START_TEST(eo_generic_data)
908 fail_if(obj2 != objtmp); 908 fail_if(obj2 != objtmp);
909 909
910 efl_key_wref_set(obj, "test1", NULL); 910 efl_key_wref_set(obj, "test1", NULL);
911 fail_if(efl_ref_get(obj2) != 1); 911 fail_if(efl_ref_count(obj2) != 1);
912 912
913 objtmp = efl_key_wref_get(obj, "test1"); 913 objtmp = efl_key_wref_get(obj, "test1");
914 fail_if(objtmp); 914 fail_if(objtmp);
@@ -1003,7 +1003,7 @@ START_TEST(eo_magic_checks)
1003 efl_isa((Eo *) buf, SIMPLE_CLASS); 1003 efl_isa((Eo *) buf, SIMPLE_CLASS);
1004 efl_isa(obj, (Efl_Class *) buf); 1004 efl_isa(obj, (Efl_Class *) buf);
1005 1005
1006 fail_if(0 != efl_ref_get((Eo *) buf)); 1006 fail_if(0 != efl_ref_count((Eo *) buf));
1007 1007
1008 efl_wref_add((Eo *) buf, &wref); 1008 efl_wref_add((Eo *) buf, &wref);
1009 parent = efl_parent_get((Eo *) buf); 1009 parent = efl_parent_get((Eo *) buf);
@@ -1322,15 +1322,15 @@ START_TEST(efl_del_intercept)
1322 Eo *parent = efl_add(SIMPLE_CLASS, NULL); 1322 Eo *parent = efl_add(SIMPLE_CLASS, NULL);
1323 obj = efl_add(klass, NULL); 1323 obj = efl_add(klass, NULL);
1324 fail_if(!obj); 1324 fail_if(!obj);
1325 ck_assert_int_eq(efl_ref_get(obj), 1); 1325 ck_assert_int_eq(efl_ref_count(obj), 1);
1326 efl_parent_set(obj, parent); 1326 efl_parent_set(obj, parent);
1327 ck_assert_int_eq(efl_ref_get(obj), 1); 1327 ck_assert_int_eq(efl_ref_count(obj), 1);
1328 efl_del_intercept_set(obj, _del_intercept_reuse); 1328 efl_del_intercept_set(obj, _del_intercept_reuse);
1329 efl_del_intercept_set(obj, NULL); 1329 efl_del_intercept_set(obj, NULL);
1330 /* This essentially checks it get unsunk */ 1330 /* This essentially checks it get unsunk */
1331 ck_assert_int_eq(efl_ref_get(obj), 1); 1331 ck_assert_int_eq(efl_ref_count(obj), 1);
1332 efl_parent_set(obj, parent); 1332 efl_parent_set(obj, parent);
1333 ck_assert_int_eq(efl_ref_get(obj), 1); 1333 ck_assert_int_eq(efl_ref_count(obj), 1);
1334 efl_del(obj); 1334 efl_del(obj);
1335 1335
1336 efl_object_shutdown(); 1336 efl_object_shutdown();
@@ -1738,22 +1738,22 @@ START_TEST(efl_object_auto_unref_test)
1738 // Test unref after valid call 1738 // Test unref after valid call
1739 _auto_unref_del = 0; 1739 _auto_unref_del = 0;
1740 obj = efl_add(SIMPLE_CLASS, NULL); 1740 obj = efl_add(SIMPLE_CLASS, NULL);
1741 fail_if(efl_ref_get(obj) != 1); 1741 fail_if(efl_ref_count(obj) != 1);
1742 efl_event_callback_add(obj, EFL_EVENT_DEL, _auto_unref_del_cb, &_auto_unref_del); 1742 efl_event_callback_add(obj, EFL_EVENT_DEL, _auto_unref_del_cb, &_auto_unref_del);
1743 efl_auto_unref_set(obj, 1); 1743 efl_auto_unref_set(obj, 1);
1744 fail_if(_auto_unref_del); 1744 fail_if(_auto_unref_del);
1745 fail_if(efl_ref_get(obj) != 1); 1745 fail_if(efl_ref_count(obj) != 1);
1746 efl_name_set(obj, "name"); 1746 efl_name_set(obj, "name");
1747 fail_if(!_auto_unref_del); 1747 fail_if(!_auto_unref_del);
1748 1748
1749 // Test unref after invalid call 1749 // Test unref after invalid call
1750 _auto_unref_del = 0; 1750 _auto_unref_del = 0;
1751 obj = efl_add(SIMPLE_CLASS, NULL); 1751 obj = efl_add(SIMPLE_CLASS, NULL);
1752 fail_if(efl_ref_get(obj) != 1); 1752 fail_if(efl_ref_count(obj) != 1);
1753 efl_event_callback_add(obj, EFL_EVENT_DEL, _auto_unref_del_cb, &_auto_unref_del); 1753 efl_event_callback_add(obj, EFL_EVENT_DEL, _auto_unref_del_cb, &_auto_unref_del);
1754 efl_auto_unref_set(obj, 1); 1754 efl_auto_unref_set(obj, 1);
1755 fail_if(_auto_unref_del); 1755 fail_if(_auto_unref_del);
1756 fail_if(efl_ref_get(obj) != 1); 1756 fail_if(efl_ref_count(obj) != 1);
1757 simple_no_implementation(obj); 1757 simple_no_implementation(obj);
1758 fail_if(!_auto_unref_del); 1758 fail_if(!_auto_unref_del);
1759 1759
@@ -1761,12 +1761,12 @@ START_TEST(efl_object_auto_unref_test)
1761 _auto_unref_del = 0; 1761 _auto_unref_del = 0;
1762 parent = efl_add(SIMPLE_CLASS, NULL); 1762 parent = efl_add(SIMPLE_CLASS, NULL);
1763 obj = efl_add(SIMPLE_CLASS, parent); 1763 obj = efl_add(SIMPLE_CLASS, parent);
1764 fail_if(efl_ref_get(obj) != 1); 1764 fail_if(efl_ref_count(obj) != 1);
1765 efl_allow_parent_unref_set(obj, 1); 1765 efl_allow_parent_unref_set(obj, 1);
1766 efl_event_callback_add(obj, EFL_EVENT_DEL, _auto_unref_del_cb, &_auto_unref_del); 1766 efl_event_callback_add(obj, EFL_EVENT_DEL, _auto_unref_del_cb, &_auto_unref_del);
1767 efl_auto_unref_set(obj, 1); 1767 efl_auto_unref_set(obj, 1);
1768 fail_if(_auto_unref_del); 1768 fail_if(_auto_unref_del);
1769 fail_if(efl_ref_get(obj) != 1); 1769 fail_if(efl_ref_count(obj) != 1);
1770 efl_name_set(obj, "name"); 1770 efl_name_set(obj, "name");
1771 fail_if(!_auto_unref_del); 1771 fail_if(!_auto_unref_del);
1772 efl_del(parent); 1772 efl_del(parent);