summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-01-17 14:07:45 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-01-17 14:21:17 +0900
commitffbc0645e57d7cad01e5c11044bcb8c7688c6e27 (patch)
tree4c770ff91722d111285aeed57e952e6738a7e8d9 /src
parent3f24b6ea2f9709fc8b77cc9d2b4580edb60f14fe (diff)
eina: Remove EAPI eina_freeq_main_set()
I believe this function is not required and should not be used by applications. If there is a very good use case to use your own main freeq, then the API could be added again. For now, removing the set() is probably the safer option. Note: the API was introduced in the upcoming 1.19
Diffstat (limited to 'src')
-rw-r--r--src/lib/eina/eina_freeq.c3
-rw-r--r--src/lib/eina/eina_freeq.h10
-rw-r--r--src/lib/eina/eina_private.h6
-rw-r--r--src/tests/eina/eina_test_freeq.c20
4 files changed, 18 insertions, 21 deletions
diff --git a/src/lib/eina/eina_freeq.c b/src/lib/eina/eina_freeq.c
index 0485501c03..898e8c9ca8 100644
--- a/src/lib/eina/eina_freeq.c
+++ b/src/lib/eina/eina_freeq.c
@@ -254,8 +254,7 @@ eina_freeq_type_get(Eina_FreeQ *fq)
254 return EINA_FREEQ_DEFAULT; 254 return EINA_FREEQ_DEFAULT;
255} 255}
256 256
257/* FIXME This function should not exist as an EAPI */ 257void
258EAPI void
259eina_freeq_main_set(Eina_FreeQ *fq) 258eina_freeq_main_set(Eina_FreeQ *fq)
260{ 259{
261 if (!fq) return; 260 if (!fq) return;
diff --git a/src/lib/eina/eina_freeq.h b/src/lib/eina/eina_freeq.h
index 7b34669452..e6fed415c2 100644
--- a/src/lib/eina/eina_freeq.h
+++ b/src/lib/eina/eina_freeq.h
@@ -150,16 +150,6 @@ EAPI Eina_FreeQ_Type
150eina_freeq_type_get(Eina_FreeQ *fq); 150eina_freeq_type_get(Eina_FreeQ *fq);
151 151
152/** 152/**
153 * @brief Set the main free queue driven by the EFL mainloop.
154 *
155 * @param fq The free queue to set as the main loop one.
156 *
157 * @since 1.19
158 */
159EAPI void
160eina_freeq_main_set(Eina_FreeQ *fq);
161
162/**
163 * @brief Get the main loop free queue. 153 * @brief Get the main loop free queue.
164 * 154 *
165 * @return The main loop free queue. 155 * @return The main loop free queue.
diff --git a/src/lib/eina/eina_private.h b/src/lib/eina/eina_private.h
index 810e4b26e5..d032f84fbd 100644
--- a/src/lib/eina/eina_private.h
+++ b/src/lib/eina/eina_private.h
@@ -138,6 +138,12 @@ void eina_cpu_count_internal(void);
138 138
139void eina_file_mmap_faulty(void *addr, long page_size); 139void eina_file_mmap_faulty(void *addr, long page_size);
140 140
141#ifndef EINA_FREEQ_H_
142typedef struct _Eina_FreeQ Eina_FreeQ;
143#endif
144
145void eina_freeq_main_set(Eina_FreeQ *fq);
146
141#include "eina_inline_private.h" 147#include "eina_inline_private.h"
142 148
143#endif /* EINA_PRIVATE_H_ */ 149#endif /* EINA_PRIVATE_H_ */
diff --git a/src/tests/eina/eina_test_freeq.c b/src/tests/eina/eina_test_freeq.c
index c1d050a726..8cd0eeda21 100644
--- a/src/tests/eina/eina_test_freeq.c
+++ b/src/tests/eina/eina_test_freeq.c
@@ -8,23 +8,25 @@
8 8
9START_TEST(freeq_simple) 9START_TEST(freeq_simple)
10{ 10{
11 Eina_FreeQ *fq, *pfq; 11 Eina_FreeQ *fq;
12 int *p;
12 13
13 eina_init(); 14 eina_init();
14 15
15 fail_if(eina_freeq_main_get() == NULL); 16 fq = eina_freeq_main_get();
16 pfq = eina_freeq_main_get(); 17 fail_if(fq == NULL);
17 fail_if(eina_freeq_type_get(pfq) != EINA_FREEQ_DEFAULT); 18 fail_if(eina_freeq_type_get(fq) != EINA_FREEQ_DEFAULT);
19
20 p = malloc(sizeof(int));
21 *p = 42;
22 eina_freeq_ptr_main_add(p, NULL, sizeof(int));
23 eina_freeq_clear(fq);
24 fail_if(eina_freeq_ptr_pending(eina_freeq_main_get()));
18 25
19 fq = eina_freeq_new(EINA_FREEQ_DEFAULT); 26 fq = eina_freeq_new(EINA_FREEQ_DEFAULT);
20 fail_if(!fq); 27 fail_if(!fq);
21 28
22 eina_freeq_main_set(fq);
23 fail_if(eina_freeq_main_get() != fq);
24
25 eina_freeq_free(fq); 29 eina_freeq_free(fq);
26 fail_if(eina_freeq_main_get() != NULL);
27 eina_freeq_main_set(pfq);
28 30
29 eina_shutdown(); 31 eina_shutdown();
30} 32}