summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-10-11 16:49:13 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-10-11 16:50:40 +0900
commit69e27abdc37f222183ce27f4ce0e3fe2a45ca590 (patch)
tree487cbabad5e0a5e5efd0c56063cf5d437484b4ea /src/lib/eina
parent725237df0a8b8cab83c8f38368e5d0389dbd196e (diff)
eina - and e3fl in general - stop using eina_error_get/set - useless really
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_array.c36
-rw-r--r--src/lib/eina/eina_array.h12
-rw-r--r--src/lib/eina/eina_benchmark.c14
-rw-r--r--src/lib/eina/eina_benchmark.h11
-rw-r--r--src/lib/eina/eina_binbuf.h6
-rw-r--r--src/lib/eina/eina_convert.c21
-rw-r--r--src/lib/eina/eina_convert.h33
-rw-r--r--src/lib/eina/eina_counter.c34
-rw-r--r--src/lib/eina/eina_counter.h5
-rw-r--r--src/lib/eina/eina_hash.c28
-rw-r--r--src/lib/eina/eina_hash.h38
-rw-r--r--src/lib/eina/eina_inarray.c38
-rw-r--r--src/lib/eina/eina_inarray.h17
-rw-r--r--src/lib/eina/eina_inline_array.x3
-rw-r--r--src/lib/eina/eina_inline_value.x102
-rw-r--r--src/lib/eina/eina_inlist.c16
-rw-r--r--src/lib/eina/eina_inlist.h13
-rw-r--r--src/lib/eina/eina_list.c38
-rw-r--r--src/lib/eina/eina_list.h46
-rw-r--r--src/lib/eina/eina_lock.h2
-rw-r--r--src/lib/eina/eina_magic.c7
-rw-r--r--src/lib/eina/eina_magic.h5
-rw-r--r--src/lib/eina/eina_main.c5
-rw-r--r--src/lib/eina/eina_matrixsparse.c20
-rw-r--r--src/lib/eina/eina_matrixsparse.h3
-rw-r--r--src/lib/eina/eina_mempool.c14
-rw-r--r--src/lib/eina/eina_model.c46
-rw-r--r--src/lib/eina/eina_model.h9
-rw-r--r--src/lib/eina/eina_module.c19
-rw-r--r--src/lib/eina/eina_module.h22
-rw-r--r--src/lib/eina/eina_rbtree.c14
-rw-r--r--src/lib/eina/eina_rbtree.h15
-rw-r--r--src/lib/eina/eina_safety_checks.c2
-rw-r--r--src/lib/eina/eina_safety_checks.h19
-rw-r--r--src/lib/eina/eina_share_common.c7
-rw-r--r--src/lib/eina/eina_strbuf.h9
-rw-r--r--src/lib/eina/eina_strbuf_common.c38
-rw-r--r--src/lib/eina/eina_stringshare.c34
-rw-r--r--src/lib/eina/eina_thread.c54
-rw-r--r--src/lib/eina/eina_thread.h40
-rw-r--r--src/lib/eina/eina_tiler.c7
-rw-r--r--src/lib/eina/eina_tmpstr.c1
-rw-r--r--src/lib/eina/eina_ustrbuf.h9
-rw-r--r--src/lib/eina/eina_value.c102
-rw-r--r--src/lib/eina/eina_value.h38
45 files changed, 162 insertions, 890 deletions
diff --git a/src/lib/eina/eina_array.c b/src/lib/eina/eina_array.c
index b460acfa32..ff727f34eb 100644
--- a/src/lib/eina/eina_array.c
+++ b/src/lib/eina/eina_array.c
@@ -28,7 +28,6 @@
28 28
29#include "eina_config.h" 29#include "eina_config.h"
30#include "eina_private.h" 30#include "eina_private.h"
31#include "eina_error.h"
32#include "eina_log.h" 31#include "eina_log.h"
33 32
34/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ 33/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
@@ -185,13 +184,8 @@ eina_array_grow(Eina_Array *array)
185 EINA_MAGIC_CHECK_ARRAY(array); 184 EINA_MAGIC_CHECK_ARRAY(array);
186 185
187 total = array->total + array->step; 186 total = array->total + array->step;
188 eina_error_set(0);
189 tmp = realloc(array->data, sizeof (void *) * total); 187 tmp = realloc(array->data, sizeof (void *) * total);
190 if (EINA_UNLIKELY(!tmp)) 188 if (EINA_UNLIKELY(!tmp)) return 0;
191 {
192 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
193 return 0;
194 }
195 189
196 array->total = total; 190 array->total = total;
197 array->data = tmp; 191 array->data = tmp;
@@ -266,13 +260,8 @@ eina_array_new(unsigned int step)
266{ 260{
267 Eina_Array *array; 261 Eina_Array *array;
268 262
269 eina_error_set(0);
270 array = malloc(sizeof (Eina_Array)); 263 array = malloc(sizeof (Eina_Array));
271 if (!array) 264 if (!array) return NULL;
272 {
273 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
274 return NULL;
275 }
276 265
277 EINA_MAGIC_SET(array, EINA_MAGIC_ARRAY); 266 EINA_MAGIC_SET(array, EINA_MAGIC_ARRAY);
278 267
@@ -390,13 +379,8 @@ eina_array_remove(Eina_Array *array, Eina_Bool (*keep)(void *data,
390 return EINA_TRUE; 379 return EINA_TRUE;
391 } 380 }
392 381
393 eina_error_set(0);
394 tmp = malloc(sizeof (void *) * array->total); 382 tmp = malloc(sizeof (void *) * array->total);
395 if (!tmp) 383 if (!tmp) return EINA_FALSE;
396 {
397 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
398 return EINA_FALSE;
399 }
400 384
401 memcpy(tmp, array->data, limit * sizeof(void *)); 385 memcpy(tmp, array->data, limit * sizeof(void *));
402 total = limit; 386 total = limit;
@@ -438,13 +422,8 @@ eina_array_iterator_new(const Eina_Array *array)
438 EINA_SAFETY_ON_NULL_RETURN_VAL(array, NULL); 422 EINA_SAFETY_ON_NULL_RETURN_VAL(array, NULL);
439 EINA_MAGIC_CHECK_ARRAY(array); 423 EINA_MAGIC_CHECK_ARRAY(array);
440 424
441 eina_error_set(0);
442 it = calloc(1, sizeof (Eina_Iterator_Array)); 425 it = calloc(1, sizeof (Eina_Iterator_Array));
443 if (!it) 426 if (!it) return NULL;
444 {
445 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
446 return NULL;
447 }
448 427
449 EINA_MAGIC_SET(it, EINA_MAGIC_ARRAY_ITERATOR); 428 EINA_MAGIC_SET(it, EINA_MAGIC_ARRAY_ITERATOR);
450 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); 429 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
@@ -468,13 +447,8 @@ eina_array_accessor_new(const Eina_Array *array)
468 EINA_SAFETY_ON_NULL_RETURN_VAL(array, NULL); 447 EINA_SAFETY_ON_NULL_RETURN_VAL(array, NULL);
469 EINA_MAGIC_CHECK_ARRAY(array); 448 EINA_MAGIC_CHECK_ARRAY(array);
470 449
471 eina_error_set(0);
472 ac = calloc(1, sizeof (Eina_Accessor_Array)); 450 ac = calloc(1, sizeof (Eina_Accessor_Array));
473 if (!ac) 451 if (!ac) return NULL;
474 {
475 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
476 return NULL;
477 }
478 452
479 EINA_MAGIC_SET(ac, EINA_MAGIC_ARRAY_ACCESSOR); 453 EINA_MAGIC_SET(ac, EINA_MAGIC_ARRAY_ACCESSOR);
480 EINA_MAGIC_SET(&ac->accessor, EINA_MAGIC_ACCESSOR); 454 EINA_MAGIC_SET(&ac->accessor, EINA_MAGIC_ACCESSOR);
diff --git a/src/lib/eina/eina_array.h b/src/lib/eina/eina_array.h
index a9f5c7a557..5a5199eb2b 100644
--- a/src/lib/eina/eina_array.h
+++ b/src/lib/eina/eina_array.h
@@ -253,8 +253,7 @@ struct _Eina_Array
253 * another element will increase the buffer by @p step elements again. 253 * another element will increase the buffer by @p step elements again.
254 * 254 *
255 * This function return a valid array on success, or @c NULL if memory 255 * This function return a valid array on success, or @c NULL if memory
256 * allocation fails. In that case, the error is set 256 * allocation fails.
257 * to #EINA_ERROR_OUT_OF_MEMORY.
258 */ 257 */
259EAPI Eina_Array *eina_array_new(unsigned int step) EINA_WARN_UNUSED_RESULT EINA_MALLOC EINA_WARN_UNUSED_RESULT; 258EAPI Eina_Array *eina_array_new(unsigned int step) EINA_WARN_UNUSED_RESULT EINA_MALLOC EINA_WARN_UNUSED_RESULT;
260 259
@@ -325,7 +324,7 @@ EAPI void eina_array_flush(Eina_Array *array) EINA_ARG_NONNULL(1);
325 * check of @p array. If it is @c NULL or invalid, the program may crash. 324 * check of @p array. If it is @c NULL or invalid, the program may crash.
326 * 325 *
327 * If it wasn't able to remove items due to an allocation failure, it will 326 * If it wasn't able to remove items due to an allocation failure, it will
328 * return #EINA_FALSE and the error is set to #EINA_ERROR_OUT_OF_MEMORY. 327 * return #EINA_FALSE.
329 */ 328 */
330EAPI Eina_Bool eina_array_remove(Eina_Array * array, 329EAPI Eina_Bool eina_array_remove(Eina_Array * array,
331 Eina_Bool (*keep)(void *data, void *gdata), 330 Eina_Bool (*keep)(void *data, void *gdata),
@@ -363,8 +362,7 @@ static inline unsigned int eina_array_count(const Eina_Array *array) EINA_ARG_NO
363 * This function returns a newly allocated iterator associated to 362 * This function returns a newly allocated iterator associated to
364 * @p array. If @p array is @c NULL or the count member of @p array is 363 * @p array. If @p array is @c NULL or the count member of @p array is
365 * less or equal than 0, this function returns @c NULL. If the memory can 364 * less or equal than 0, this function returns @c NULL. If the memory can
366 * not be allocated, NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is 365 * not be allocated, NULL is returned. Otherwise, a valid iterator is returned.
367 * set. Otherwise, a valid iterator is returned.
368 */ 366 */
369EAPI Eina_Iterator *eina_array_iterator_new(const Eina_Array *array) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; 367EAPI Eina_Iterator *eina_array_iterator_new(const Eina_Array *array) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
370 368
@@ -377,8 +375,8 @@ EAPI Eina_Iterator *eina_array_iterator_new(const Eina_Array *array) EINA
377 * This function returns a newly allocated accessor associated to 375 * This function returns a newly allocated accessor associated to
378 * @p array. If @p array is @c NULL or the count member of @p array is 376 * @p array. If @p array is @c NULL or the count member of @p array is
379 * less or equal than 0, this function returns @c NULL. If the memory can 377 * less or equal than 0, this function returns @c NULL. If the memory can
380 * not be allocated, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is 378 * not be allocated, @c NULL is returned Otherwise, a valid accessor is
381 * set. Otherwise, a valid accessor is returned. 379 * returned.
382 */ 380 */
383EAPI Eina_Accessor *eina_array_accessor_new(const Eina_Array *array) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; 381EAPI Eina_Accessor *eina_array_accessor_new(const Eina_Array *array) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
384/** 382/**
diff --git a/src/lib/eina/eina_benchmark.c b/src/lib/eina/eina_benchmark.c
index 701c1840cb..d018a0ae0d 100644
--- a/src/lib/eina/eina_benchmark.c
+++ b/src/lib/eina/eina_benchmark.c
@@ -142,13 +142,8 @@ eina_benchmark_new(const char *name, const char *run)
142{ 142{
143 Eina_Benchmark *new; 143 Eina_Benchmark *new;
144 144
145 eina_error_set(0);
146 new = calloc(1, sizeof (Eina_Benchmark)); 145 new = calloc(1, sizeof (Eina_Benchmark));
147 if (!new) 146 if (!new) return NULL;
148 {
149 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
150 return NULL;
151 }
152 147
153 new->name = name; 148 new->name = name;
154 new->run = run; 149 new->run = run;
@@ -203,13 +198,8 @@ eina_benchmark_register(Eina_Benchmark *bench,
203 if (count_step == 0) 198 if (count_step == 0)
204 return EINA_FALSE; 199 return EINA_FALSE;
205 200
206 eina_error_set(0);
207 run = calloc(1, sizeof (Eina_Run)); 201 run = calloc(1, sizeof (Eina_Run));
208 if (!run) 202 if (!run) return EINA_FALSE;
209 {
210 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
211 return EINA_FALSE;
212 }
213 203
214 run->cb = bench_cb; 204 run->cb = bench_cb;
215 run->name = name; 205 run->name = name;
diff --git a/src/lib/eina/eina_benchmark.h b/src/lib/eina/eina_benchmark.h
index a95aadf14e..8c0c5988da 100644
--- a/src/lib/eina/eina_benchmark.h
+++ b/src/lib/eina/eina_benchmark.h
@@ -365,9 +365,8 @@ typedef void (*Eina_Benchmark_Specimens)(int request);
365 * to name the gnuplot file that eina_benchmark_run() will create. 365 * to name the gnuplot file that eina_benchmark_run() will create.
366 * 366 *
367 * This function return a valid benchmark on success, or @c NULL if 367 * This function return a valid benchmark on success, or @c NULL if
368 * memory allocation fails. In that case, the error is set 368 * memory allocation fails.
369 * to #EINA_ERROR_OUT_OF_MEMORY. 369 *
370 *
371 * When the new module is not needed anymore, use 370 * When the new module is not needed anymore, use
372 * eina_benchmark_free() to free the allocated memory. 371 * eina_benchmark_free() to free the allocated memory.
373 */ 372 */
@@ -403,10 +402,8 @@ EAPI void eina_benchmark_free(Eina_Benchmark *bench);
403 * increasing by @p count_step from @p count_start to @p count_end is passed to @p 402 * increasing by @p count_step from @p count_start to @p count_end is passed to @p
404 * bench_cb when eina_benchmark_run() is called. 403 * bench_cb when eina_benchmark_run() is called.
405 * 404 *
406 * If @p bench is @c NULL, this function returns immediately. If the 405 * If @p bench is @c NULL, this function returns immediately.
407 * allocation of the memory of the test to add fails, the error is set 406 * This function returns #EINA_FALSE on failure, #EINA_TRUE otherwise.
408 * to #EINA_ERROR_OUT_OF_MEMORY. This function returns #EINA_FALSE
409 * on failure, #EINA_TRUE otherwise.
410 */ 407 */
411EAPI Eina_Bool eina_benchmark_register(Eina_Benchmark *bench, 408EAPI Eina_Bool eina_benchmark_register(Eina_Benchmark *bench,
412 const char *name, 409 const char *name,
diff --git a/src/lib/eina/eina_binbuf.h b/src/lib/eina/eina_binbuf.h
index c28df05af4..c0a2069bc6 100644
--- a/src/lib/eina/eina_binbuf.h
+++ b/src/lib/eina/eina_binbuf.h
@@ -39,8 +39,7 @@ typedef struct _Eina_Strbuf Eina_Binbuf;
39 * @return Newly allocated string buffer instance. 39 * @return Newly allocated string buffer instance.
40 * 40 *
41 * This function creates a new string buffer. On error, @c NULL is 41 * This function creates a new string buffer. On error, @c NULL is
42 * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To 42 * returned. To free the resources, use eina_binbuf_free().
43 * free the resources, use eina_binbuf_free().
44 * 43 *
45 * @see eina_binbuf_free() 44 * @see eina_binbuf_free()
46 * @see eina_binbuf_append() 45 * @see eina_binbuf_append()
@@ -58,8 +57,7 @@ EAPI Eina_Binbuf *eina_binbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
58 * @return Newly allocated string buffer instance. 57 * @return Newly allocated string buffer instance.
59 * 58 *
60 * This function creates a new string buffer. On error, @c NULL is 59 * This function creates a new string buffer. On error, @c NULL is
61 * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To 60 * returned. To free the resources, use eina_binbuf_free().
62 * free the resources, use eina_binbuf_free().
63 * 61 *
64 * @see eina_binbuf_manage_new() 62 * @see eina_binbuf_manage_new()
65 * @since 1.2.0 63 * @since 1.2.0
diff --git a/src/lib/eina/eina_convert.c b/src/lib/eina/eina_convert.c
index 7e397e0e6e..3eeacda5f4 100644
--- a/src/lib/eina/eina_convert.c
+++ b/src/lib/eina/eina_convert.c
@@ -92,13 +92,6 @@ EAPI Eina_Error EINA_ERROR_CONVERT_P_NOT_FOUND = 0;
92EAPI Eina_Error EINA_ERROR_CONVERT_0X_NOT_FOUND = 0; 92EAPI Eina_Error EINA_ERROR_CONVERT_0X_NOT_FOUND = 0;
93EAPI Eina_Error EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH = 0; 93EAPI Eina_Error EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH = 0;
94 94
95static const char EINA_ERROR_CONVERT_0X_NOT_FOUND_STR[] =
96 "Error during string conversion to float, First '0x' was not found.";
97static const char EINA_ERROR_CONVERT_P_NOT_FOUND_STR[] =
98 "Error during string conversion to float, First 'p' was not found.";
99static const char EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH_STR[] =
100 "Error outrun string limit during conversion string conversion to float.";
101
102/** 95/**
103 * @endcond 96 * @endcond
104 */ 97 */
@@ -112,10 +105,6 @@ static const char EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH_STR[] =
112 * This function sets up the convert module of Eina. It is called by 105 * This function sets up the convert module of Eina. It is called by
113 * eina_init(). 106 * eina_init().
114 * 107 *
115 * This function sets up the error module of Eina and registers the
116 * errors #EINA_ERROR_CONVERT_0X_NOT_FOUND, #EINA_ERROR_CONVERT_P_NOT_FOUND
117 * and #EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH.
118 *
119 * @see eina_init() 108 * @see eina_init()
120 */ 109 */
121Eina_Bool 110Eina_Bool
@@ -128,13 +117,6 @@ eina_convert_init(void)
128 EINA_LOG_ERR("Could not register log domain: eina_convert"); 117 EINA_LOG_ERR("Could not register log domain: eina_convert");
129 return EINA_FALSE; 118 return EINA_FALSE;
130 } 119 }
131
132#define EEMR(n) n = eina_error_msg_static_register(n ## _STR)
133 EEMR(EINA_ERROR_CONVERT_0X_NOT_FOUND);
134 EEMR(EINA_ERROR_CONVERT_P_NOT_FOUND);
135 EEMR(EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH);
136#undef EEMR
137
138 return EINA_TRUE; 120 return EINA_TRUE;
139} 121}
140 122
@@ -239,7 +221,6 @@ eina_convert_atod(const char *src, int length, long long *m, long *e)
239 221
240 if (strncmp(str, "0x", 2)) 222 if (strncmp(str, "0x", 2))
241 { 223 {
242 eina_error_set(EINA_ERROR_CONVERT_0X_NOT_FOUND);
243 DBG("'0x' not found in '%s'", src); 224 DBG("'0x' not found in '%s'", src);
244 return EINA_FALSE; 225 return EINA_FALSE;
245 } 226 }
@@ -268,7 +249,6 @@ eina_convert_atod(const char *src, int length, long long *m, long *e)
268 /* Compute the exponent. */ 249 /* Compute the exponent. */
269 if (*str != 'p') 250 if (*str != 'p')
270 { 251 {
271 eina_error_set(EINA_ERROR_CONVERT_P_NOT_FOUND);
272 DBG("'p' not found in '%s'", src); 252 DBG("'p' not found in '%s'", src);
273 return EINA_FALSE; 253 return EINA_FALSE;
274 } 254 }
@@ -304,7 +284,6 @@ eina_convert_atod(const char *src, int length, long long *m, long *e)
304 return EINA_TRUE; 284 return EINA_TRUE;
305 285
306on_length_error: 286on_length_error:
307 eina_error_set(EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH);
308 return EINA_FALSE; 287 return EINA_FALSE;
309} 288}
310 289
diff --git a/src/lib/eina/eina_convert.h b/src/lib/eina/eina_convert.h
index 6493964a2f..fa463d9da4 100644
--- a/src/lib/eina/eina_convert.h
+++ b/src/lib/eina/eina_convert.h
@@ -158,23 +158,8 @@
158 * @{ 158 * @{
159 */ 159 */
160 160
161/**
162 * @var EINA_ERROR_CONVERT_P_NOT_FOUND
163 * Error identifier corresponding to string not containing 'p'.
164 */
165
166EAPI extern Eina_Error EINA_ERROR_CONVERT_P_NOT_FOUND; 161EAPI extern Eina_Error EINA_ERROR_CONVERT_P_NOT_FOUND;
167
168/**
169 * @var EINA_ERROR_CONVERT_0X_NOT_FOUND
170 * Error identifier corresponding to string not containing '0x'.
171 */
172EAPI extern Eina_Error EINA_ERROR_CONVERT_0X_NOT_FOUND; 162EAPI extern Eina_Error EINA_ERROR_CONVERT_0X_NOT_FOUND;
173
174/**
175 * @var EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH
176 * Error identifier corresponding to length of the string being too small.
177 */
178EAPI extern Eina_Error EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH; 163EAPI extern Eina_Error EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH;
179 164
180/** 165/**
@@ -269,14 +254,7 @@ EAPI int eina_convert_dtoa(double d, char *des) EINA_ARG_NONNULL(2);
269 * The mantiss and exponent are stored in the buffers pointed 254 * The mantiss and exponent are stored in the buffers pointed
270 * respectively by @p m and @p e. 255 * respectively by @p m and @p e.
271 * 256 *
272 * If the string is invalid, the error is set to: 257 * If the string is invalid #EINA_FALSE is returned, otherwise #EINA_TRUE is
273 *
274 * @li #EINA_ERROR_CONVERT_0X_NOT_FOUND if no 0x is found,
275 * @li #EINA_ERROR_CONVERT_P_NOT_FOUND if no p is found,
276 * @li #EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH if @p length is not
277 * correct.
278 *
279 * In those cases, #EINA_FALSE is returned, otherwise #EINA_TRUE is
280 * returned. 258 * returned.
281 */ 259 */
282EAPI Eina_Bool eina_convert_atod(const char *src, 260EAPI Eina_Bool eina_convert_atod(const char *src,
@@ -346,14 +324,7 @@ EAPI int eina_convert_fptoa(Eina_F32p32 fp,
346 * The mantiss and exponent are stored in the buffers pointed 324 * The mantiss and exponent are stored in the buffers pointed
347 * respectively by @p m and @p e. 325 * respectively by @p m and @p e.
348 * 326 *
349 * If the string is invalid, the error is set to: 327 * If the string is invalid, #EINA_FALSE is returned,
350 *
351 * @li #EINA_ERROR_CONVERT_0X_NOT_FOUND if no 0x is found,
352 * @li #EINA_ERROR_CONVERT_P_NOT_FOUND if no p is found,
353 * @li #EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH if @p length is not
354 * correct.
355 *
356 * In those cases, or if @p fp is @c NULL, #EINA_FALSE is returned,
357 * otherwise @p fp is computed and #EINA_TRUE is returned. 328 * otherwise @p fp is computed and #EINA_TRUE is returned.
358 * 329 *
359 * @note The code uses eina_convert_atod() and do the correct bit 330 * @note The code uses eina_convert_atod() and do the correct bit
diff --git a/src/lib/eina/eina_counter.c b/src/lib/eina/eina_counter.c
index 63a183de42..084788eddb 100644
--- a/src/lib/eina/eina_counter.c
+++ b/src/lib/eina/eina_counter.c
@@ -28,7 +28,6 @@
28#include "eina_config.h" 28#include "eina_config.h"
29#include "eina_private.h" 29#include "eina_private.h"
30#include "eina_inlist.h" 30#include "eina_inlist.h"
31#include "eina_error.h"
32 31
33/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ 32/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
34#include "eina_safety_checks.h" 33#include "eina_safety_checks.h"
@@ -70,9 +69,6 @@ struct _Eina_Clock
70}; 69};
71 70
72#ifdef _WIN32 71#ifdef _WIN32
73static const char EINA_ERROR_COUNTER_WINDOWS_STR[] =
74 "Change your OS, you moron !";
75static int EINA_ERROR_COUNTER_WINDOWS = 0;
76LARGE_INTEGER _eina_counter_frequency; 72LARGE_INTEGER _eina_counter_frequency;
77#endif 73#endif
78 74
@@ -134,8 +130,7 @@ _eina_counter_asiprintf(char *base, int *position, const char *format, ...)
134 * eina_counter_init(). It is called by eina_init(). 130 * eina_counter_init(). It is called by eina_init().
135 * 131 *
136 * This function sets up the error module of Eina and only on Windows, 132 * This function sets up the error module of Eina and only on Windows,
137 * it initializes the high precision timer. It also registers, only on 133 * it initializes the high precision timer. It is also called
138 * Windows, the error #EINA_ERROR_COUNTER_WINDOWS. It is also called
139 * by eina_init(). It returns 0 on failure, otherwise it returns the 134 * by eina_init(). It returns 0 on failure, otherwise it returns the
140 * number of times it has already been called. 135 * number of times it has already been called.
141 * 136 *
@@ -145,14 +140,7 @@ Eina_Bool
145eina_counter_init(void) 140eina_counter_init(void)
146{ 141{
147#ifdef _WIN32 142#ifdef _WIN32
148 EINA_ERROR_COUNTER_WINDOWS = eina_error_msg_static_register( 143 if (!QueryPerformanceFrequency(&_eina_counter_frequency)) return EINA_FALSE;
149 EINA_ERROR_COUNTER_WINDOWS_STR);
150 if (!QueryPerformanceFrequency(&_eina_counter_frequency))
151 {
152 eina_error_set(EINA_ERROR_COUNTER_WINDOWS);
153 return EINA_FALSE;
154 }
155
156#endif /* _WIN2 */ 144#endif /* _WIN2 */
157 return EINA_TRUE; 145 return EINA_TRUE;
158} 146}
@@ -187,14 +175,8 @@ eina_counter_new(const char *name)
187 EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL); 175 EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);
188 176
189 length = strlen(name) + 1; 177 length = strlen(name) + 1;
190
191 eina_error_set(0);
192 counter = calloc(1, sizeof (Eina_Counter) + length); 178 counter = calloc(1, sizeof (Eina_Counter) + length);
193 if (!counter) 179 if (!counter) return NULL;
194 {
195 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
196 return NULL;
197 }
198 180
199 counter->name = (char *)(counter + 1); 181 counter->name = (char *)(counter + 1);
200 memcpy((char *)counter->name, name, length); 182 memcpy((char *)counter->name, name, length);
@@ -225,16 +207,10 @@ eina_counter_start(Eina_Counter *counter)
225 Eina_Nano_Time tp; 207 Eina_Nano_Time tp;
226 208
227 EINA_SAFETY_ON_NULL_RETURN(counter); 209 EINA_SAFETY_ON_NULL_RETURN(counter);
228 if (_eina_time_get(&tp) != 0) 210 if (_eina_time_get(&tp) != 0) return;
229 return;
230 211
231 eina_error_set(0);
232 clk = calloc(1, sizeof (Eina_Clock)); 212 clk = calloc(1, sizeof (Eina_Clock));
233 if (!clk) 213 if (!clk) return;
234 {
235 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
236 return;
237 }
238 214
239 counter->clocks = eina_inlist_prepend(counter->clocks, EINA_INLIST_GET(clk)); 215 counter->clocks = eina_inlist_prepend(counter->clocks, EINA_INLIST_GET(clk));
240 216
diff --git a/src/lib/eina/eina_counter.h b/src/lib/eina/eina_counter.h
index 677d97e86b..5d54e9050a 100644
--- a/src/lib/eina/eina_counter.h
+++ b/src/lib/eina/eina_counter.h
@@ -129,8 +129,7 @@ typedef struct _Eina_Counter Eina_Counter;
129 * 129 *
130 * This function returns a new counter. It is characterized by @p 130 * This function returns a new counter. It is characterized by @p
131 * name. If @p name is @c NULL, the function returns @c NULL 131 * name. If @p name is @c NULL, the function returns @c NULL
132 * immediately. If memory allocation fails, @c NULL is returned and the 132 * immediately. If memory allocation fails, @c NULL is returned.
133 * error is set to #EINA_ERROR_OUT_OF_MEMORY.
134 * 133 *
135 * Whe the new counter is not needed anymore, use eina_counter_free() to 134 * Whe the new counter is not needed anymore, use eina_counter_free() to
136 * free the allocated memory. 135 * free the allocated memory.
@@ -160,7 +159,7 @@ EAPI void eina_counter_free(Eina_Counter *counter) EINA_ARG_NONNULL(1);
160 * 159 *
161 * This function adds the clock associated to @p counter in a list. If 160 * This function adds the clock associated to @p counter in a list. If
162 * the memory needed by that clock can not be allocated, the function 161 * the memory needed by that clock can not be allocated, the function
163 * returns and the error is set to #EINA_ERROR_OUT_OF_MEMORY. 162 * returns and nothing is done.
164 * 163 *
165 * To stop the timing, eina_counter_stop() must be called with the 164 * To stop the timing, eina_counter_stop() must be called with the
166 * same counter. 165 * same counter.
diff --git a/src/lib/eina/eina_hash.c b/src/lib/eina/eina_hash.c
index eec34f939f..87dd68679e 100644
--- a/src/lib/eina/eina_hash.c
+++ b/src/lib/eina/eina_hash.c
@@ -33,7 +33,6 @@
33#include "eina_config.h" 33#include "eina_config.h"
34#include "eina_private.h" 34#include "eina_private.h"
35#include "eina_rbtree.h" 35#include "eina_rbtree.h"
36#include "eina_error.h"
37 36
38/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ 37/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
39#include "eina_safety_checks.h" 38#include "eina_safety_checks.h"
@@ -219,7 +218,6 @@ eina_hash_add_alloc_by_hash(Eina_Hash *hash,
219{ 218{
220 Eina_Hash_Element *new_hash_element = NULL; 219 Eina_Hash_Element *new_hash_element = NULL;
221 Eina_Hash_Head *hash_head; 220 Eina_Hash_Head *hash_head;
222 Eina_Error error = 0;
223 int original_key; 221 int original_key;
224 int hash_num; 222 int hash_num;
225 223
@@ -228,8 +226,6 @@ eina_hash_add_alloc_by_hash(Eina_Hash *hash,
228 EINA_SAFETY_ON_NULL_RETURN_VAL(data, EINA_FALSE); 226 EINA_SAFETY_ON_NULL_RETURN_VAL(data, EINA_FALSE);
229 EINA_MAGIC_CHECK_HASH(hash); 227 EINA_MAGIC_CHECK_HASH(hash);
230 228
231 error = EINA_ERROR_OUT_OF_MEMORY;
232
233 /* Apply eina mask to hash. */ 229 /* Apply eina mask to hash. */
234 original_key = key_hash; 230 original_key = key_hash;
235 hash_num = key_hash & hash->mask; 231 hash_num = key_hash & hash->mask;
@@ -299,7 +295,6 @@ eina_hash_add_alloc_by_hash(Eina_Hash *hash,
299 return EINA_TRUE; 295 return EINA_TRUE;
300 296
301on_error: 297on_error:
302 eina_error_set(error);
303 return EINA_FALSE; 298 return EINA_FALSE;
304} 299}
305 300
@@ -729,7 +724,6 @@ eina_hash_new(Eina_Key_Length key_length_cb,
729 /* FIXME: Use mempool. */ 724 /* FIXME: Use mempool. */
730 Eina_Hash *new; 725 Eina_Hash *new;
731 726
732 eina_error_set(0);
733 EINA_SAFETY_ON_NULL_RETURN_VAL(key_cmp_cb, NULL); 727 EINA_SAFETY_ON_NULL_RETURN_VAL(key_cmp_cb, NULL);
734 EINA_SAFETY_ON_NULL_RETURN_VAL(key_hash_cb, NULL); 728 EINA_SAFETY_ON_NULL_RETURN_VAL(key_hash_cb, NULL);
735 EINA_SAFETY_ON_TRUE_RETURN_VAL(buckets_power_size <= 2, NULL); 729 EINA_SAFETY_ON_TRUE_RETURN_VAL(buckets_power_size <= 2, NULL);
@@ -754,7 +748,6 @@ eina_hash_new(Eina_Key_Length key_length_cb,
754 return new; 748 return new;
755 749
756on_error: 750on_error:
757 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
758 return NULL; 751 return NULL;
759} 752}
760 753
@@ -1234,13 +1227,8 @@ eina_hash_iterator_data_new(const Eina_Hash *hash)
1234 EINA_SAFETY_ON_NULL_RETURN_VAL(hash, NULL); 1227 EINA_SAFETY_ON_NULL_RETURN_VAL(hash, NULL);
1235 EINA_MAGIC_CHECK_HASH(hash); 1228 EINA_MAGIC_CHECK_HASH(hash);
1236 1229
1237 eina_error_set(0);
1238 it = calloc(1, sizeof (Eina_Iterator_Hash)); 1230 it = calloc(1, sizeof (Eina_Iterator_Hash));
1239 if (!it) 1231 if (!it) return NULL;
1240 {
1241 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
1242 return NULL;
1243 }
1244 1232
1245 it->hash = hash; 1233 it->hash = hash;
1246 it->get_content = FUNC_ITERATOR_GET_CONTENT(_eina_hash_iterator_data_get_content); 1234 it->get_content = FUNC_ITERATOR_GET_CONTENT(_eina_hash_iterator_data_get_content);
@@ -1265,13 +1253,8 @@ eina_hash_iterator_key_new(const Eina_Hash *hash)
1265 EINA_SAFETY_ON_NULL_RETURN_VAL(hash, NULL); 1253 EINA_SAFETY_ON_NULL_RETURN_VAL(hash, NULL);
1266 EINA_MAGIC_CHECK_HASH(hash); 1254 EINA_MAGIC_CHECK_HASH(hash);
1267 1255
1268 eina_error_set(0);
1269 it = calloc(1, sizeof (Eina_Iterator_Hash)); 1256 it = calloc(1, sizeof (Eina_Iterator_Hash));
1270 if (!it) 1257 if (!it) return NULL;
1271 {
1272 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
1273 return NULL;
1274 }
1275 1258
1276 it->hash = hash; 1259 it->hash = hash;
1277 it->get_content = FUNC_ITERATOR_GET_CONTENT( 1260 it->get_content = FUNC_ITERATOR_GET_CONTENT(
@@ -1297,13 +1280,8 @@ eina_hash_iterator_tuple_new(const Eina_Hash *hash)
1297 EINA_SAFETY_ON_NULL_RETURN_VAL(hash, NULL); 1280 EINA_SAFETY_ON_NULL_RETURN_VAL(hash, NULL);
1298 EINA_MAGIC_CHECK_HASH(hash); 1281 EINA_MAGIC_CHECK_HASH(hash);
1299 1282
1300 eina_error_set(0);
1301 it = calloc(1, sizeof (Eina_Iterator_Hash)); 1283 it = calloc(1, sizeof (Eina_Iterator_Hash));
1302 if (!it) 1284 if (!it) return NULL;
1303 {
1304 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
1305 return NULL;
1306 }
1307 1285
1308 it->hash = hash; 1286 it->hash = hash;
1309 it->get_content = FUNC_ITERATOR_GET_CONTENT( 1287 it->get_content = FUNC_ITERATOR_GET_CONTENT(
diff --git a/src/lib/eina/eina_hash.h b/src/lib/eina/eina_hash.h
index a127dda7c2..4f4aac9a50 100644
--- a/src/lib/eina/eina_hash.h
+++ b/src/lib/eina/eina_hash.h
@@ -330,8 +330,8 @@ typedef Eina_Bool (*Eina_Hash_Foreach)(const Eina_Hash *hash, const void *key
330 * @return The new hash table. 330 * @return The new hash table.
331 * 331 *
332 * This function creates a new hash table using user-defined callbacks 332 * This function creates a new hash table using user-defined callbacks
333 * to manage the hash table. On failure, @c NULL is returned 333 * to manage the hash table. On failure, @c NULL is returned.
334 * and #EINA_ERROR_OUT_OF_MEMORY is set. If @p key_cmp_cb or @p key_hash_cb 334 * If @p key_cmp_cb or @p key_hash_cb
335 * are @c NULL, @c NULL is returned. If @p buckets_power_size is 335 * are @c NULL, @c NULL is returned. If @p buckets_power_size is
336 * smaller or equal than 2, or if it is greater or equal than 17, 336 * smaller or equal than 2, or if it is greater or equal than 17,
337 * @c NULL is returned. 337 * @c NULL is returned.
@@ -518,9 +518,7 @@ EAPI Eina_Hash *eina_hash_stringshared_new(Eina_Free_Cb data_free_cb);
518 * values as unique. Failure to use sufficient uniqueness will 518 * values as unique. Failure to use sufficient uniqueness will
519 * result in unexpected results when inserting data pointers accessed 519 * result in unexpected results when inserting data pointers accessed
520 * with eina_hash_find(), and removed with eina_hash_del(). Key 520 * with eina_hash_find(), and removed with eina_hash_del(). Key
521 * strings are case sensitive. If an error occurs, eina_error_get() 521 * strings are case sensitive. This function returns #EINA_FALSE if an error
522 * should be used to determine if an allocation error occurred during
523 * this function. This function returns #EINA_FALSE if an error
524 * occurred, #EINA_TRUE otherwise. 522 * occurred, #EINA_TRUE otherwise.
525 */ 523 */
526EAPI Eina_Bool eina_hash_add(Eina_Hash *hash, 524EAPI Eina_Bool eina_hash_add(Eina_Hash *hash,
@@ -548,9 +546,7 @@ EAPI Eina_Bool eina_hash_add(Eina_Hash *hash,
548 * with eina_hash_find(), and removed with eina_hash_del(). This 546 * with eina_hash_find(), and removed with eina_hash_del(). This
549 * function does not make a copy of @p key, so it must be a string 547 * function does not make a copy of @p key, so it must be a string
550 * constant or stored elsewhere ( in the object being added). Key 548 * constant or stored elsewhere ( in the object being added). Key
551 * strings are case sensitive. If an error occurs, eina_error_get() 549 * strings are case sensitive. This function returns #EINA_FALSE if an error
552 * should be used to determine if an allocation error occurred during
553 * this function. This function returns #EINA_FALSE if an error
554 * occurred, #EINA_TRUE otherwise. 550 * occurred, #EINA_TRUE otherwise.
555 */ 551 */
556EAPI Eina_Bool eina_hash_direct_add(Eina_Hash *hash, 552EAPI Eina_Bool eina_hash_direct_add(Eina_Hash *hash,
@@ -630,8 +626,7 @@ EAPI void *eina_hash_modify(Eina_Hash *hash,
630 * This function modifies the data of @p key with @p data in @p 626 * This function modifies the data of @p key with @p data in @p
631 * hash. If no entry is found, @p data is added to @p hash with the 627 * hash. If no entry is found, @p data is added to @p hash with the
632 * key @p key. On success this function returns the old entry, 628 * key @p key. On success this function returns the old entry,
633 * otherwise it returns @c NULL. To check for errors, use 629 * otherwise it returns @c NULL.
634 * eina_error_get().
635 */ 630 */
636EAPI void *eina_hash_set(Eina_Hash *hash, 631EAPI void *eina_hash_set(Eina_Hash *hash,
637 const void *key, 632 const void *key,
@@ -722,9 +717,7 @@ EAPI int eina_hash_population(const Eina_Hash *hash) EINA_ARG_NONNULL(1);
722 * not forget to count '\\0' for string when setting the value of 717 * not forget to count '\\0' for string when setting the value of
723 * @p key_length. @p key_hash is expected to always match 718 * @p key_length. @p key_hash is expected to always match
724 * @p key. Otherwise, one cannot be sure to find it again with @ref 719 * @p key. Otherwise, one cannot be sure to find it again with @ref
725 * eina_hash_find_by_hash. Key strings are case sensitive. If an error 720 * eina_hash_find_by_hash. Key strings are case sensitive. This function
726 * occurs, eina_error_get() should be used to determine if an
727 * allocation error occurred during this function. This function
728 * returns #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. 721 * returns #EINA_FALSE if an error occurred, #EINA_TRUE otherwise.
729 * 722 *
730 * @see eina_hash_add() 723 * @see eina_hash_add()
@@ -758,9 +751,7 @@ EAPI Eina_Bool eina_hash_add_by_hash(Eina_Hash *hash,
758 * not forget to count '\\0' for string when setting the value of 751 * not forget to count '\\0' for string when setting the value of
759 * @p key_length. @p key_hash is expected to always match 752 * @p key_length. @p key_hash is expected to always match
760 * @p key. Otherwise, one cannot be sure to find it again with @ref 753 * @p key. Otherwise, one cannot be sure to find it again with @ref
761 * eina_hash_find_by_hash. Key strings are case sensitive. If an error 754 * eina_hash_find_by_hash. Key strings are case sensitive. This function
762 * occurs, eina_error_get() should be used to determine if an
763 * allocation error occurred during this function. This function
764 * returns #EINA_FALSE if an error occurred, #EINA_TRUE otherwise. 755 * returns #EINA_FALSE if an error occurred, #EINA_TRUE otherwise.
765 * 756 *
766 * @see eina_hash_direct_add() 757 * @see eina_hash_direct_add()
@@ -934,9 +925,8 @@ EAPI void *eina_hash_modify_by_hash(Eina_Hash *hash,
934 * valid iterator that will always return false on 925 * valid iterator that will always return false on
935 * eina_iterator_next(), thus keeping API sane. 926 * eina_iterator_next(), thus keeping API sane.
936 * 927 *
937 * If the memory can not be allocated, NULL is returned 928 * If the memory can not be allocated, NULL is returned.
938 * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is 929 * Otherwise, a valid iterator is returned.
939 * returned.
940 * 930 *
941 * @warning if the hash structure changes then the iterator becomes 931 * @warning if the hash structure changes then the iterator becomes
942 * invalid! That is, if you add or remove items this iterator 932 * invalid! That is, if you add or remove items this iterator
@@ -955,9 +945,8 @@ EAPI Eina_Iterator *eina_hash_iterator_key_new(const Eina_Hash *hash) EINA_MALLO
955 * valid iterator that will always return false on 945 * valid iterator that will always return false on
956 * eina_iterator_next(), thus keeping API sane. 946 * eina_iterator_next(), thus keeping API sane.
957 * 947 *
958 * If the memory can not be allocated, @c NULL is returned 948 * If the memory can not be allocated, @c NULL is returned.
959 * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is 949 * Otherwise, a valid iterator is returned.
960 * returned.
961 * 950 *
962 * @warning if the hash structure changes then the iterator becomes 951 * @warning if the hash structure changes then the iterator becomes
963 * invalid. That is, if you add or remove items this iterator behavior 952 * invalid. That is, if you add or remove items this iterator behavior
@@ -976,9 +965,8 @@ EAPI Eina_Iterator *eina_hash_iterator_data_new(const Eina_Hash *hash) EINA_MALL
976 * valid iterator that will always return false on 965 * valid iterator that will always return false on
977 * eina_iterator_next(), thus keeping API sane. 966 * eina_iterator_next(), thus keeping API sane.
978 * 967 *
979 * If the memory can not be allocated, @c NULL is returned 968 * If the memory can not be allocated, @c NULL is returned.
980 * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is 969 * Otherwise, a valid iterator is returned.
981 * returned.
982 * 970 *
983 * @note iterator data will provide values as Eina_Hash_Tuple that should not 971 * @note iterator data will provide values as Eina_Hash_Tuple that should not
984 * be modified! 972 * be modified!
diff --git a/src/lib/eina/eina_inarray.c b/src/lib/eina/eina_inarray.c
index 1e962e4961..e674a20f3c 100644
--- a/src/lib/eina/eina_inarray.c
+++ b/src/lib/eina/eina_inarray.c
@@ -25,7 +25,6 @@
25 25
26#include "eina_config.h" 26#include "eina_config.h"
27#include "eina_private.h" 27#include "eina_private.h"
28#include "eina_error.h"
29#include "eina_log.h" 28#include "eina_log.h"
30 29
31/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ 30/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
@@ -82,7 +81,6 @@ static int _eina_inarray_log_dom = -1;
82 EINA_MAGIC_FAIL(d, EINA_MAGIC_INARRAY); \ 81 EINA_MAGIC_FAIL(d, EINA_MAGIC_INARRAY); \
83 return __VA_ARGS__; \ 82 return __VA_ARGS__; \
84 } \ 83 } \
85 eina_error_set(0); \
86 } \ 84 } \
87 while(0) 85 while(0)
88 86
@@ -94,7 +92,6 @@ static int _eina_inarray_log_dom = -1;
94 EINA_MAGIC_FAIL(d, EINA_MAGIC_INARRAY_ITERATOR); \ 92 EINA_MAGIC_FAIL(d, EINA_MAGIC_INARRAY_ITERATOR); \
95 return __VA_ARGS__; \ 93 return __VA_ARGS__; \
96 } \ 94 } \
97 eina_error_set(0); \
98 } \ 95 } \
99 while(0) 96 while(0)
100 97
@@ -106,7 +103,6 @@ static int _eina_inarray_log_dom = -1;
106 EINA_MAGIC_FAIL(d, EINA_MAGIC_INARRAY_ACCESSOR); \ 103 EINA_MAGIC_FAIL(d, EINA_MAGIC_INARRAY_ACCESSOR); \
107 return __VA_ARGS__; \ 104 return __VA_ARGS__; \
108 } \ 105 } \
109 eina_error_set(0); \
110 } \ 106 } \
111 while(0) 107 while(0)
112 108
@@ -137,11 +133,7 @@ _eina_inarray_resize(Eina_Inarray *array, unsigned int new_size)
137 new_max = ((new_size / array->step) + 1) * array->step; 133 new_max = ((new_size / array->step) + 1) * array->step;
138 134
139 tmp = realloc(array->members, new_max * array->member_size); 135 tmp = realloc(array->members, new_max * array->member_size);
140 if ((!tmp) && (new_max > 0)) 136 if ((!tmp) && (new_max > 0)) return EINA_FALSE;
141 {
142 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
143 return EINA_FALSE;
144 }
145 137
146 array->members = tmp; 138 array->members = tmp;
147 array->max = new_max; 139 array->max = new_max;
@@ -342,12 +334,7 @@ eina_inarray_new(unsigned int member_size, unsigned int step)
342 EINA_SAFETY_ON_TRUE_RETURN_VAL(member_size == 0, NULL); 334 EINA_SAFETY_ON_TRUE_RETURN_VAL(member_size == 0, NULL);
343 335
344 ret = malloc(sizeof(*ret)); 336 ret = malloc(sizeof(*ret));
345 if (!ret) 337 if (!ret) return NULL;
346 {
347 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
348 return NULL;
349 }
350 eina_error_set(0);
351 _eina_inarray_setup(ret, member_size, step); 338 _eina_inarray_setup(ret, member_size, step);
352 return ret; 339 return ret;
353} 340}
@@ -730,13 +717,8 @@ eina_inarray_iterator_new(const Eina_Inarray *array)
730 717
731 EINA_MAGIC_CHECK_INARRAY(array, NULL); 718 EINA_MAGIC_CHECK_INARRAY(array, NULL);
732 719
733 eina_error_set(0);
734 it = calloc(1, sizeof(Eina_Iterator_Inarray)); 720 it = calloc(1, sizeof(Eina_Iterator_Inarray));
735 if (!it) 721 if (!it) return NULL;
736 {
737 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
738 return NULL;
739 }
740 722
741 EINA_MAGIC_SET(it, EINA_MAGIC_INARRAY_ITERATOR); 723 EINA_MAGIC_SET(it, EINA_MAGIC_INARRAY_ITERATOR);
742 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); 724 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
@@ -759,13 +741,8 @@ eina_inarray_iterator_reversed_new(const Eina_Inarray *array)
759 741
760 EINA_MAGIC_CHECK_INARRAY(array, NULL); 742 EINA_MAGIC_CHECK_INARRAY(array, NULL);
761 743
762 eina_error_set(0);
763 it = calloc(1, sizeof(Eina_Iterator_Inarray)); 744 it = calloc(1, sizeof(Eina_Iterator_Inarray));
764 if (!it) 745 if (!it) return NULL;
765 {
766 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
767 return NULL;
768 }
769 746
770 EINA_MAGIC_SET(it, EINA_MAGIC_INARRAY_ITERATOR); 747 EINA_MAGIC_SET(it, EINA_MAGIC_INARRAY_ITERATOR);
771 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); 748 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
@@ -789,13 +766,8 @@ eina_inarray_accessor_new(const Eina_Inarray *array)
789 766
790 EINA_MAGIC_CHECK_INARRAY(array, NULL); 767 EINA_MAGIC_CHECK_INARRAY(array, NULL);
791 768
792 eina_error_set(0);
793 ac = calloc(1, sizeof(Eina_Accessor_Inarray)); 769 ac = calloc(1, sizeof(Eina_Accessor_Inarray));
794 if (!ac) 770 if (!ac) return NULL;
795 {
796 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
797 return NULL;
798 }
799 771
800 EINA_MAGIC_SET(ac, EINA_MAGIC_INARRAY_ACCESSOR); 772 EINA_MAGIC_SET(ac, EINA_MAGIC_INARRAY_ACCESSOR);
801 EINA_MAGIC_SET(&ac->accessor, EINA_MAGIC_ACCESSOR); 773 EINA_MAGIC_SET(&ac->accessor, EINA_MAGIC_ACCESSOR);
diff --git a/src/lib/eina/eina_inarray.h b/src/lib/eina/eina_inarray.h
index ed1a84b39f..9d7f9f6d8c 100644
--- a/src/lib/eina/eina_inarray.h
+++ b/src/lib/eina/eina_inarray.h
@@ -224,8 +224,8 @@ struct _Eina_Inarray
224 * 224 *
225 * If the @a step is 0, then a safe default is chosen. 225 * If the @a step is 0, then a safe default is chosen.
226 * 226 *
227 * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is 227 * On failure, @c NULL is returned. If @a member_size is zero, then @c NULL
228 * set. If @a member_size is zero, then @c NULL is returned. 228 * is returned.
229 * 229 *
230 * @see eina_inarray_free() 230 * @see eina_inarray_free()
231 * 231 *
@@ -618,9 +618,8 @@ EAPI unsigned int eina_inarray_count(const Eina_Inarray *array) EINA_ARG_NONNULL
618 * This function returns a newly allocated iterator associated to 618 * This function returns a newly allocated iterator associated to
619 * @p array. 619 * @p array.
620 * 620 *
621 * If the memory can not be allocated, @c NULL is returned 621 * If the memory can not be allocated, @c NULL is returned.
622 * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is 622 * Otherwise, a valid iterator is returned.
623 * returned.
624 * 623 *
625 * @warning if the array structure changes then the iterator becomes 624 * @warning if the array structure changes then the iterator becomes
626 * invalid! That is, if you add or remove members this 625 * invalid! That is, if you add or remove members this
@@ -641,8 +640,7 @@ EAPI Eina_Iterator *eina_inarray_iterator_new(const Eina_Inarray *array) EINA_MA
641 * Unlike eina_inarray_iterator_new(), this will walk the array backwards. 640 * Unlike eina_inarray_iterator_new(), this will walk the array backwards.
642 * 641 *
643 * If the memory can not be allocated, @c NULL is returned 642 * If the memory can not be allocated, @c NULL is returned
644 * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is 643 * Otherwise, a valid iterator is returned.
645 * returned.
646 * 644 *
647 * @warning if the array structure changes then the iterator becomes 645 * @warning if the array structure changes then the iterator becomes
648 * invalid! That is, if you add or remove nodes this iterator 646 * invalid! That is, if you add or remove nodes this iterator
@@ -660,9 +658,8 @@ EAPI Eina_Iterator *eina_inarray_iterator_reversed_new(const Eina_Inarray *array
660 * This function returns a newly allocated accessor associated to 658 * This function returns a newly allocated accessor associated to
661 * @p array. 659 * @p array.
662 * 660 *
663 * If the memory can not be allocated, @c NULL is returned 661 * If the memory can not be allocated, @c NULL is returned.
664 * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid accessor is 662 * Otherwise, a valid accessor is returned.
665 * returned.
666 * 663 *
667 * @since 1.2 664 * @since 1.2
668 */ 665 */
diff --git a/src/lib/eina/eina_inline_array.x b/src/lib/eina/eina_inline_array.x
index 179d43c4eb..45d7189316 100644
--- a/src/lib/eina/eina_inline_array.x
+++ b/src/lib/eina/eina_inline_array.x
@@ -52,8 +52,7 @@ EAPI Eina_Bool eina_array_grow(Eina_Array *array);
52 * reasons, there is no check of @p array. If it is @c NULL or 52 * reasons, there is no check of @p array. If it is @c NULL or
53 * invalid, the program may crash. If @p data is @c NULL, or if an 53 * invalid, the program may crash. If @p data is @c NULL, or if an
54 * allocation is necessary and fails, #EINA_FALSE is returned 54 * allocation is necessary and fails, #EINA_FALSE is returned
55 * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, #EINA_TRUE is 55 * Otherwise, #EINA_TRUE is returned.
56 * returned.
57 */ 56 */
58 57
59static inline Eina_Bool 58static inline Eina_Bool
diff --git a/src/lib/eina/eina_inline_value.x b/src/lib/eina/eina_inline_value.x
index 9ed7620c19..1021dca11d 100644
--- a/src/lib/eina/eina_inline_value.x
+++ b/src/lib/eina/eina_inline_value.x
@@ -64,8 +64,6 @@ EAPI extern const Eina_Value_Type *_EINA_VALUE_TYPE_BASICS_END;
64 { \ 64 { \
65 if (type->method) \ 65 if (type->method) \
66 type->method(type, ##__VA_ARGS__); \ 66 type->method(type, ##__VA_ARGS__); \
67 else \
68 eina_error_set(no_method_err); \
69 } \ 67 } \
70 while (0) 68 while (0)
71 69
@@ -74,7 +72,6 @@ EAPI extern const Eina_Value_Type *_EINA_VALUE_TYPE_BASICS_END;
74 { \ 72 { \
75 if (type->method) \ 73 if (type->method) \
76 return type->method(type, ##__VA_ARGS__); \ 74 return type->method(type, ##__VA_ARGS__); \
77 eina_error_set(no_method_err); \
78 return def_ret; \ 75 return def_ret; \
79 } \ 76 } \
80 while (0) 77 while (0)
@@ -126,12 +123,11 @@ eina_value_setup(Eina_Value *value, const Eina_Value_Type *type)
126 123
127 if (EINA_VALUE_TYPE_DEFAULT(type)) 124 if (EINA_VALUE_TYPE_DEFAULT(type))
128 { 125 {
129 eina_error_set(0);
130 return EINA_TRUE; 126 return EINA_TRUE;
131 } 127 }
132 128
133 EINA_VALUE_TYPE_DISPATCH_RETURN(type, setup, 129 EINA_VALUE_TYPE_DISPATCH_RETURN(type, setup,
134 EINA_ERROR_VALUE_FAILED, EINA_FALSE, mem); 130 0, EINA_FALSE, mem);
135} 131}
136 132
137static inline void 133static inline void
@@ -157,11 +153,10 @@ eina_value_flush(Eina_Value *value)
157 } 153 }
158 else if (type->value_size > 8) 154 else if (type->value_size > 8)
159 eina_value_inner_free(type->value_size, mem); 155 eina_value_inner_free(type->value_size, mem);
160 eina_error_set(0);
161 return; 156 return;
162 } 157 }
163 158
164 EINA_VALUE_TYPE_DISPATCH(type, flush, EINA_ERROR_VALUE_FAILED, mem); 159 EINA_VALUE_TYPE_DISPATCH(type, flush, 0, mem);
165 if (type->value_size > 8) 160 if (type->value_size > 8)
166 eina_value_inner_free(type->value_size, mem); 161 eina_value_inner_free(type->value_size, mem);
167 value->type = NULL; 162 value->type = NULL;
@@ -177,7 +172,6 @@ eina_value_compare(const Eina_Value *a, const Eina_Value *b)
177 EINA_SAFETY_ON_NULL_RETURN_VAL(b, -1); 172 EINA_SAFETY_ON_NULL_RETURN_VAL(b, -1);
178 EINA_SAFETY_ON_FALSE_RETURN_VAL(a->type == b->type, -1); 173 EINA_SAFETY_ON_FALSE_RETURN_VAL(a->type == b->type, -1);
179 174
180 eina_error_set(0);
181 type = a->type; 175 type = a->type;
182 pa = eina_value_memory_get(a); 176 pa = eina_value_memory_get(a);
183 pb = eina_value_memory_get(b); 177 pb = eina_value_memory_get(b);
@@ -306,7 +300,7 @@ eina_value_compare(const Eina_Value *a, const Eina_Value *b)
306 } 300 }
307#endif 301#endif
308 302
309 EINA_VALUE_TYPE_DISPATCH_RETURN(type, compare, EINA_ERROR_VALUE_FAILED, 303 EINA_VALUE_TYPE_DISPATCH_RETURN(type, compare, 0,
310 EINA_FALSE, pa, pb); 304 EINA_FALSE, pa, pb);
311} 305}
312 306
@@ -342,7 +336,6 @@ eina_value_vset(Eina_Value *value, va_list args)
342 336
343 type = value->type; 337 type = value->type;
344 mem = eina_value_memory_get(value); 338 mem = eina_value_memory_get(value);
345 eina_error_set(0);
346#ifndef EINA_VALUE_NO_OPTIMIZE 339#ifndef EINA_VALUE_NO_OPTIMIZE
347 if (type == EINA_VALUE_TYPE_UCHAR) 340 if (type == EINA_VALUE_TYPE_UCHAR)
348 { 341 {
@@ -433,11 +426,7 @@ eina_value_vset(Eina_Value *value, va_list args)
433 else 426 else
434 { 427 {
435 char *tmp = strdup(str); 428 char *tmp = strdup(str);
436 if (!tmp) 429 if (!tmp) return EINA_FALSE;
437 {
438 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
439 return EINA_FALSE;
440 }
441 free(value->value.ptr); 430 free(value->value.ptr);
442 value->value.ptr = tmp; 431 value->value.ptr = tmp;
443 } 432 }
@@ -445,7 +434,7 @@ eina_value_vset(Eina_Value *value, va_list args)
445 } 434 }
446#endif 435#endif
447 436
448 EINA_VALUE_TYPE_DISPATCH_RETURN(value, vset, EINA_ERROR_VALUE_FAILED, 437 EINA_VALUE_TYPE_DISPATCH_RETURN(value, vset, 0,
449 EINA_FALSE, mem, args); 438 EINA_FALSE, mem, args);
450} 439}
451 440
@@ -461,14 +450,13 @@ eina_value_vget(const Eina_Value *value, va_list args)
461 type = value->type; 450 type = value->type;
462 mem = eina_value_memory_get(value); 451 mem = eina_value_memory_get(value);
463 ptr = va_arg(args, void *); 452 ptr = va_arg(args, void *);
464 eina_error_set(0);
465 if (EINA_VALUE_TYPE_DEFAULT(type)) 453 if (EINA_VALUE_TYPE_DEFAULT(type))
466 { 454 {
467 memcpy(ptr, mem, type->value_size); 455 memcpy(ptr, mem, type->value_size);
468 return EINA_TRUE; 456 return EINA_TRUE;
469 } 457 }
470 458
471 EINA_VALUE_TYPE_DISPATCH_RETURN(value, pget, EINA_ERROR_VALUE_FAILED, 459 EINA_VALUE_TYPE_DISPATCH_RETURN(value, pget, 0,
472 EINA_FALSE, mem, ptr); 460 EINA_FALSE, mem, ptr);
473} 461}
474 462
@@ -483,7 +471,6 @@ eina_value_pset(Eina_Value *value, const void *ptr)
483 471
484 type = value->type; 472 type = value->type;
485 mem = eina_value_memory_get(value); 473 mem = eina_value_memory_get(value);
486 eina_error_set(0);
487 474
488 if (EINA_VALUE_TYPE_DEFAULT(type)) 475 if (EINA_VALUE_TYPE_DEFAULT(type))
489 { 476 {
@@ -506,11 +493,7 @@ eina_value_pset(Eina_Value *value, const void *ptr)
506 else 493 else
507 { 494 {
508 char *tmp = strdup(str); 495 char *tmp = strdup(str);
509 if (!tmp) 496 if (!tmp) return EINA_FALSE;
510 {
511 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
512 return EINA_FALSE;
513 }
514 free(value->value.ptr); 497 free(value->value.ptr);
515 value->value.ptr = tmp; 498 value->value.ptr = tmp;
516 } 499 }
@@ -521,7 +504,7 @@ eina_value_pset(Eina_Value *value, const void *ptr)
521 return EINA_TRUE; 504 return EINA_TRUE;
522 } 505 }
523 506
524 EINA_VALUE_TYPE_DISPATCH_RETURN(value, pset, EINA_ERROR_VALUE_FAILED, 507 EINA_VALUE_TYPE_DISPATCH_RETURN(value, pset, 0,
525 EINA_FALSE, mem, ptr); 508 EINA_FALSE, mem, ptr);
526} 509}
527 510
@@ -536,14 +519,13 @@ eina_value_pget(const Eina_Value *value, void *ptr)
536 519
537 type = value->type; 520 type = value->type;
538 mem = eina_value_memory_get(value); 521 mem = eina_value_memory_get(value);
539 eina_error_set(0);
540 if (EINA_VALUE_TYPE_DEFAULT(type)) 522 if (EINA_VALUE_TYPE_DEFAULT(type))
541 { 523 {
542 memcpy(ptr, mem, type->value_size); 524 memcpy(ptr, mem, type->value_size);
543 return EINA_TRUE; 525 return EINA_TRUE;
544 } 526 }
545 527
546 EINA_VALUE_TYPE_DISPATCH_RETURN(value, pget, EINA_ERROR_VALUE_FAILED, 528 EINA_VALUE_TYPE_DISPATCH_RETURN(value, pget, 0,
547 EINA_FALSE, mem, ptr); 529 EINA_FALSE, mem, ptr);
548} 530}
549 531
@@ -1281,11 +1263,7 @@ eina_value_hash_vset(Eina_Value *value, const char *key, va_list args)
1281 if (!mem) 1263 if (!mem)
1282 { 1264 {
1283 mem = malloc(desc->subtype->value_size); 1265 mem = malloc(desc->subtype->value_size);
1284 if (!mem) 1266 if (!mem) return EINA_FALSE;
1285 {
1286 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
1287 return EINA_FALSE;
1288 }
1289 if (!eina_hash_add(desc->hash, key, mem)) 1267 if (!eina_hash_add(desc->hash, key, mem))
1290 { 1268 {
1291 free(mem); 1269 free(mem);
@@ -1364,11 +1342,7 @@ eina_value_hash_pset(Eina_Value *value, const char *key, const void *ptr)
1364 if (!mem) 1342 if (!mem)
1365 { 1343 {
1366 mem = malloc(desc->subtype->value_size); 1344 mem = malloc(desc->subtype->value_size);
1367 if (!mem) 1345 if (!mem) return EINA_FALSE;
1368 {
1369 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
1370 return EINA_FALSE;
1371 }
1372 if (!eina_hash_add(desc->hash, key, mem)) 1346 if (!eina_hash_add(desc->hash, key, mem))
1373 { 1347 {
1374 free(mem); 1348 free(mem);
@@ -1678,11 +1652,7 @@ static inline Eina_Bool
1678eina_value_type_setup(const Eina_Value_Type *type, void *mem) 1652eina_value_type_setup(const Eina_Value_Type *type, void *mem)
1679{ 1653{
1680 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); 1654 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1681 if (!type->setup) 1655 if (!type->setup) return EINA_FALSE;
1682 {
1683 eina_error_set(EINA_ERROR_VALUE_FAILED);
1684 return EINA_FALSE;
1685 }
1686 return type->setup(type, mem); 1656 return type->setup(type, mem);
1687} 1657}
1688 1658
@@ -1690,11 +1660,7 @@ static inline Eina_Bool
1690eina_value_type_flush(const Eina_Value_Type *type, void *mem) 1660eina_value_type_flush(const Eina_Value_Type *type, void *mem)
1691{ 1661{
1692 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); 1662 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1693 if (!type->flush) 1663 if (!type->flush) return EINA_FALSE;
1694 {
1695 eina_error_set(EINA_ERROR_VALUE_FAILED);
1696 return EINA_FALSE;
1697 }
1698 return type->flush(type, mem); 1664 return type->flush(type, mem);
1699} 1665}
1700 1666
@@ -1702,11 +1668,7 @@ static inline Eina_Bool
1702eina_value_type_copy(const Eina_Value_Type *type, const void *src, void *dst) 1668eina_value_type_copy(const Eina_Value_Type *type, const void *src, void *dst)
1703{ 1669{
1704 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); 1670 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1705 if (!type->copy) 1671 if (!type->copy) return EINA_FALSE;
1706 {
1707 eina_error_set(EINA_ERROR_VALUE_FAILED);
1708 return EINA_FALSE;
1709 }
1710 return type->copy(type, src, dst); 1672 return type->copy(type, src, dst);
1711} 1673}
1712 1674
@@ -1714,11 +1676,7 @@ static inline int
1714eina_value_type_compare(const Eina_Value_Type *type, const void *a, const void *b) 1676eina_value_type_compare(const Eina_Value_Type *type, const void *a, const void *b)
1715{ 1677{
1716 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); 1678 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1717 if (!type->compare) 1679 if (!type->compare) return EINA_FALSE;
1718 {
1719 eina_error_set(EINA_ERROR_VALUE_FAILED);
1720 return EINA_FALSE;
1721 }
1722 return type->compare(type, a, b); 1680 return type->compare(type, a, b);
1723} 1681}
1724 1682
@@ -1726,11 +1684,7 @@ static inline Eina_Bool
1726eina_value_type_convert_to(const Eina_Value_Type *type, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) 1684eina_value_type_convert_to(const Eina_Value_Type *type, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
1727{ 1685{
1728 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); 1686 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1729 if (!type->convert_to) 1687 if (!type->convert_to) return EINA_FALSE;
1730 {
1731 eina_error_set(EINA_ERROR_VALUE_FAILED);
1732 return EINA_FALSE;
1733 }
1734 return type->convert_to(type, convert, type_mem, convert_mem); 1688 return type->convert_to(type, convert, type_mem, convert_mem);
1735} 1689}
1736 1690
@@ -1738,11 +1692,7 @@ static inline Eina_Bool
1738eina_value_type_convert_from(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem) 1692eina_value_type_convert_from(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem)
1739{ 1693{
1740 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); 1694 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1741 if (!type->convert_from) 1695 if (!type->convert_from) return EINA_FALSE;
1742 {
1743 eina_error_set(EINA_ERROR_VALUE_FAILED);
1744 return EINA_FALSE;
1745 }
1746 return type->convert_from(type, convert, type_mem, convert_mem); 1696 return type->convert_from(type, convert, type_mem, convert_mem);
1747} 1697}
1748 1698
@@ -1750,11 +1700,7 @@ static inline Eina_Bool
1750eina_value_type_vset(const Eina_Value_Type *type, void *mem, va_list args) 1700eina_value_type_vset(const Eina_Value_Type *type, void *mem, va_list args)
1751{ 1701{
1752 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); 1702 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1753 if (!type->vset) 1703 if (!type->vset) return EINA_FALSE;
1754 {
1755 eina_error_set(EINA_ERROR_VALUE_FAILED);
1756 return EINA_FALSE;
1757 }
1758 return type->vset(type, mem, args); 1704 return type->vset(type, mem, args);
1759} 1705}
1760 1706
@@ -1762,11 +1708,7 @@ static inline Eina_Bool
1762eina_value_type_pset(const Eina_Value_Type *type, void *mem, const void *ptr) 1708eina_value_type_pset(const Eina_Value_Type *type, void *mem, const void *ptr)
1763{ 1709{
1764 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); 1710 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1765 if (!type->pset) 1711 if (!type->pset) return EINA_FALSE;
1766 {
1767 eina_error_set(EINA_ERROR_VALUE_FAILED);
1768 return EINA_FALSE;
1769 }
1770 return type->pset(type, mem, ptr); 1712 return type->pset(type, mem, ptr);
1771} 1713}
1772 1714
@@ -1774,11 +1716,7 @@ static inline Eina_Bool
1774eina_value_type_pget(const Eina_Value_Type *type, const void *mem, void *ptr) 1716eina_value_type_pget(const Eina_Value_Type *type, const void *mem, void *ptr)
1775{ 1717{
1776 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); 1718 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE);
1777 if (!type->pget) 1719 if (!type->pget) return EINA_FALSE;
1778 {
1779 eina_error_set(EINA_ERROR_VALUE_FAILED);
1780 return EINA_FALSE;
1781 }
1782 return type->pget(type, mem, ptr); 1720 return type->pget(type, mem, ptr);
1783} 1721}
1784 1722
diff --git a/src/lib/eina/eina_inlist.c b/src/lib/eina/eina_inlist.c
index 24e7826eff..f2eb42b7b1 100644
--- a/src/lib/eina/eina_inlist.c
+++ b/src/lib/eina/eina_inlist.c
@@ -27,7 +27,6 @@
27 27
28#include "eina_config.h" 28#include "eina_config.h"
29#include "eina_private.h" 29#include "eina_private.h"
30#include "eina_error.h"
31#include "eina_log.h" 30#include "eina_log.h"
32 31
33/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ 32/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
@@ -342,7 +341,6 @@ eina_inlist_remove(Eina_Inlist *list, Eina_Inlist *item)
342 EINA_SAFETY_ON_NULL_RETURN_VAL(item, list); 341 EINA_SAFETY_ON_NULL_RETURN_VAL(item, list);
343 if (EINA_UNLIKELY((item != list) && (!item->prev) && (!item->next))) 342 if (EINA_UNLIKELY((item != list) && (!item->prev) && (!item->next)))
344 { 343 {
345 eina_error_set(EINA_ERROR_SAFETY_FAILED);
346 EINA_LOG_ERR("safety check failed: item %p does not appear to be part of an inlist!", item); 344 EINA_LOG_ERR("safety check failed: item %p does not appear to be part of an inlist!", item);
347 return list; 345 return list;
348 } 346 }
@@ -870,13 +868,8 @@ eina_inlist_iterator_new(const Eina_Inlist *list)
870{ 868{
871 Eina_Iterator_Inlist *it; 869 Eina_Iterator_Inlist *it;
872 870
873 eina_error_set(0);
874 it = calloc(1, sizeof (Eina_Iterator_Inlist)); 871 it = calloc(1, sizeof (Eina_Iterator_Inlist));
875 if (!it) 872 if (!it) return NULL;
876 {
877 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
878 return NULL;
879 }
880 873
881 it->head = list; 874 it->head = list;
882 it->current = list; 875 it->current = list;
@@ -897,13 +890,8 @@ eina_inlist_accessor_new(const Eina_Inlist *list)
897{ 890{
898 Eina_Accessor_Inlist *ac; 891 Eina_Accessor_Inlist *ac;
899 892
900 eina_error_set(0);
901 ac = calloc(1, sizeof (Eina_Accessor_Inlist)); 893 ac = calloc(1, sizeof (Eina_Accessor_Inlist));
902 if (!ac) 894 if (!ac) return NULL;
903 {
904 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
905 return NULL;
906 }
907 895
908 ac->head = list; 896 ac->head = list;
909 ac->current = list; 897 ac->current = list;
diff --git a/src/lib/eina/eina_inlist.h b/src/lib/eina/eina_inlist.h
index ba7ffecc77..ccca63e4f9 100644
--- a/src/lib/eina/eina_inlist.h
+++ b/src/lib/eina/eina_inlist.h
@@ -639,9 +639,8 @@ EAPI unsigned int eina_inlist_count(const Eina_Inlist *list) EINA_WARN_UNUSED_
639 * will always return false on eina_iterator_next(), thus keeping API 639 * will always return false on eina_iterator_next(), thus keeping API
640 * sane. 640 * sane.
641 * 641 *
642 * If the memory can not be allocated, @c NULL is returned 642 * If the memory can not be allocated, @c NULL is returned.
643 * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator 643 * Otherwise, a valid iterator is returned.
644 * is returned.
645 * 644 *
646 * @warning if the list structure changes then the iterator becomes 645 * @warning if the list structure changes then the iterator becomes
647 * invalid, and if you add or remove nodes iterator 646 * invalid, and if you add or remove nodes iterator
@@ -658,8 +657,8 @@ EAPI Eina_Iterator *eina_inlist_iterator_new(const Eina_Inlist *in_list) EINA_MA
658 * This function returns a newly allocated accessor associated to 657 * This function returns a newly allocated accessor associated to
659 * @p in_list. If @p in_list is @c NULL or the count member of @p in_list is 658 * @p in_list. If @p in_list is @c NULL or the count member of @p in_list is
660 * less or equal than @c 0, this function returns @c NULL. If the memory can 659 * less or equal than @c 0, this function returns @c NULL. If the memory can
661 * not be allocated, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is 660 * not be allocated, @c NULL is returned and Otherwise, a valid accessor is
662 * set. Otherwise, a valid accessor is returned. 661 * returned.
663 */ 662 */
664EAPI Eina_Accessor *eina_inlist_accessor_new(const Eina_Inlist *in_list) EINA_MALLOC EINA_WARN_UNUSED_RESULT; 663EAPI Eina_Accessor *eina_inlist_accessor_new(const Eina_Inlist *in_list) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
665 664
@@ -676,7 +675,7 @@ EAPI Eina_Accessor *eina_inlist_accessor_new(const Eina_Inlist *in_list) EINA_MA
676 * sorted and the result will be sorted. If @p list is @c NULLL, item 675 * sorted and the result will be sorted. If @p list is @c NULLL, item
677 * is returned. On success, a new list pointer that should be 676 * is returned. On success, a new list pointer that should be
678 * used in place of the one given to this function is 677 * used in place of the one given to this function is
679 * returned. Otherwise, the old pointer is returned. See eina_error_get(). 678 * returned. Otherwise, the old pointer is returned.
680 * 679 *
681 * @note O(log2(n)) comparisons (calls to @p func) average/worst case 680 * @note O(log2(n)) comparisons (calls to @p func) average/worst case
682 * performance. As said in eina_list_search_sorted_near_list(), 681 * performance. As said in eina_list_search_sorted_near_list(),
@@ -738,7 +737,7 @@ EAPI void eina_inlist_sorted_state_free(Eina_Inlist_Sorted_State *state);
738 * list with an updated state.. If @p list is @c NULLL, item 737 * list with an updated state.. If @p list is @c NULLL, item
739 * is returned. On success, a new list pointer that should be 738 * is returned. On success, a new list pointer that should be
740 * used in place of the one given to this function is 739 * used in place of the one given to this function is
741 * returned. Otherwise, the old pointer is returned. See eina_error_get(). 740 * returned. Otherwise, the old pointer is returned.
742 * 741 *
743 * @note O(log2(n)) comparisons (calls to @p func) average/worst case 742 * @note O(log2(n)) comparisons (calls to @p func) average/worst case
744 * performance. As said in eina_list_search_sorted_near_list(), 743 * performance. As said in eina_list_search_sorted_near_list(),
diff --git a/src/lib/eina/eina_list.c b/src/lib/eina/eina_list.c
index b4707c7b36..9162088e6e 100644
--- a/src/lib/eina/eina_list.c
+++ b/src/lib/eina/eina_list.c
@@ -68,7 +68,6 @@
68 68
69#include "eina_config.h" 69#include "eina_config.h"
70#include "eina_private.h" 70#include "eina_private.h"
71#include "eina_error.h"
72#include "eina_log.h" 71#include "eina_log.h"
73#include "eina_mempool.h" 72#include "eina_mempool.h"
74 73
@@ -532,10 +531,8 @@ eina_list_append(Eina_List *list, const void *data)
532{ 531{
533 Eina_List *l, *new_l; 532 Eina_List *l, *new_l;
534 533
535 eina_error_set(0);
536 new_l = _eina_list_mempool_list_new(list); 534 new_l = _eina_list_mempool_list_new(list);
537 if (!new_l) 535 if (!new_l) return list;
538 return list;
539 536
540 new_l->next = NULL; 537 new_l->next = NULL;
541 new_l->data = (void *)data; 538 new_l->data = (void *)data;
@@ -562,10 +559,8 @@ eina_list_prepend(Eina_List *list, const void *data)
562{ 559{
563 Eina_List *new_l; 560 Eina_List *new_l;
564 561
565 eina_error_set(0);
566 new_l = _eina_list_mempool_list_new(list); 562 new_l = _eina_list_mempool_list_new(list);
567 if (!new_l) 563 if (!new_l) return list;
568 return list;
569 564
570 new_l->prev = NULL; 565 new_l->prev = NULL;
571 new_l->next = list; 566 new_l->next = list;
@@ -613,10 +608,8 @@ eina_list_append_relative_list(Eina_List *list,
613 if ((!list) || (!relative)) 608 if ((!list) || (!relative))
614 return eina_list_append(list, data); 609 return eina_list_append(list, data);
615 610
616 eina_error_set(0);
617 new_l = _eina_list_mempool_list_new(list); 611 new_l = _eina_list_mempool_list_new(list);
618 if (!new_l) 612 if (!new_l) return list;
619 return list;
620 613
621 EINA_MAGIC_CHECK_LIST(relative, NULL); 614 EINA_MAGIC_CHECK_LIST(relative, NULL);
622 new_l->next = relative->next; 615 new_l->next = relative->next;
@@ -665,10 +658,8 @@ eina_list_prepend_relative_list(Eina_List *list,
665 if ((!list) || (!relative)) 658 if ((!list) || (!relative))
666 return eina_list_prepend(list, data); 659 return eina_list_prepend(list, data);
667 660
668 eina_error_set(0);
669 new_l = _eina_list_mempool_list_new(list); 661 new_l = _eina_list_mempool_list_new(list);
670 if (!new_l) 662 if (!new_l) return list;
671 return list;
672 663
673 EINA_MAGIC_CHECK_LIST(relative, NULL); 664 EINA_MAGIC_CHECK_LIST(relative, NULL);
674 665
@@ -1493,13 +1484,8 @@ eina_list_iterator_new(const Eina_List *list)
1493{ 1484{
1494 Eina_Iterator_List *it; 1485 Eina_Iterator_List *it;
1495 1486
1496 eina_error_set(0);
1497 it = calloc(1, sizeof (Eina_Iterator_List)); 1487 it = calloc(1, sizeof (Eina_Iterator_List));
1498 if (!it) 1488 if (!it) return NULL;
1499 {
1500 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
1501 return NULL;
1502 }
1503 1489
1504 EINA_MAGIC_SET(it, EINA_MAGIC_LIST_ITERATOR); 1490 EINA_MAGIC_SET(it, EINA_MAGIC_LIST_ITERATOR);
1505 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); 1491 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
@@ -1521,13 +1507,8 @@ eina_list_iterator_reversed_new(const Eina_List *list)
1521{ 1507{
1522 Eina_Iterator_List *it; 1508 Eina_Iterator_List *it;
1523 1509
1524 eina_error_set(0);
1525 it = calloc(1, sizeof (Eina_Iterator_List)); 1510 it = calloc(1, sizeof (Eina_Iterator_List));
1526 if (!it) 1511 if (!it) return NULL;
1527 {
1528 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
1529 return NULL;
1530 }
1531 1512
1532 EINA_MAGIC_SET(it, EINA_MAGIC_LIST_ITERATOR); 1513 EINA_MAGIC_SET(it, EINA_MAGIC_LIST_ITERATOR);
1533 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); 1514 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
@@ -1551,13 +1532,8 @@ eina_list_accessor_new(const Eina_List *list)
1551 1532
1552 EINA_SAFETY_ON_NULL_RETURN_VAL(list, NULL); 1533 EINA_SAFETY_ON_NULL_RETURN_VAL(list, NULL);
1553 1534
1554 eina_error_set(0);
1555 ac = calloc(1, sizeof (Eina_Accessor_List)); 1535 ac = calloc(1, sizeof (Eina_Accessor_List));
1556 if (!ac) 1536 if (!ac) return NULL;
1557 {
1558 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
1559 return NULL;
1560 }
1561 1537
1562 EINA_MAGIC_SET(ac, EINA_MAGIC_LIST_ACCESSOR); 1538 EINA_MAGIC_SET(ac, EINA_MAGIC_LIST_ACCESSOR);
1563 EINA_MAGIC_SET(&ac->accessor, EINA_MAGIC_ACCESSOR); 1539 EINA_MAGIC_SET(&ac->accessor, EINA_MAGIC_ACCESSOR);
diff --git a/src/lib/eina/eina_list.h b/src/lib/eina/eina_list.h
index a3c17d32e0..2f9c17ec94 100644
--- a/src/lib/eina/eina_list.h
+++ b/src/lib/eina/eina_list.h
@@ -361,11 +361,6 @@ struct _Eina_List_Accounting
361 * extern void *my_data; 361 * extern void *my_data;
362 * 362 *
363 * list = eina_list_append(list, my_data); 363 * list = eina_list_append(list, my_data);
364 * if (eina_error_get())
365 * {
366 * fprintf(stderr, "ERROR: Memory is low. List allocation failed.\n");
367 * exit(-1);
368 * }
369 * @endcode 364 * @endcode
370 * 365 *
371 * @warning @p list must be a pointer to the first element of the list(or NULL). 366 * @warning @p list must be a pointer to the first element of the list(or NULL).
@@ -394,11 +389,6 @@ EAPI Eina_List *eina_list_append(Eina_List *list, const void *data) E
394 * extern void *my_data; 389 * extern void *my_data;
395 * 390 *
396 * list = eina_list_prepend(list, my_data); 391 * list = eina_list_prepend(list, my_data);
397 * if (eina_error_get())
398 * {
399 * fprintf(stderr, "ERROR: Memory is low. List allocation failed.\n");
400 * exit(-1);
401 * }
402 * @endcode 392 * @endcode
403 * 393 *
404 * @warning @p list must be a pointer to the first element of the list. 394 * @warning @p list must be a pointer to the first element of the list.
@@ -431,17 +421,7 @@ EAPI Eina_List *eina_list_prepend(Eina_List *list, const void *data)
431 * extern void *relative_member; 421 * extern void *relative_member;
432 * 422 *
433 * list = eina_list_append(list, relative_member); 423 * list = eina_list_append(list, relative_member);
434 * if (eina_error_get())
435 * {
436 * fprintf(stderr, "ERROR: Memory is low. List allocation failed.\n");
437 * exit(-1);
438 * }
439 * list = eina_list_append_relative(list, my_data, relative_member); 424 * list = eina_list_append_relative(list, my_data, relative_member);
440 * if (eina_error_get())
441 * {
442 * fprintf(stderr, "ERROR: Memory is low. List allocation failed.\n");
443 * exit(-1);
444 * }
445 * @endcode 425 * @endcode
446 * 426 *
447 * @warning @p list must be a pointer to the first element of the list. 427 * @warning @p list must be a pointer to the first element of the list.
@@ -496,17 +476,7 @@ EAPI Eina_List *eina_list_append_relative_list(Eina_List *list, const
496 * extern void *relative_member; 476 * extern void *relative_member;
497 * 477 *
498 * list = eina_list_append(list, relative_member); 478 * list = eina_list_append(list, relative_member);
499 * if (eina_error_get_error())
500 * {
501 * fprintf(stderr, "ERROR: Memory is low. List allocation failed.\n");
502 * exit(-1);
503 * }
504 * list = eina_list_prepend_relative(list, my_data, relative_member); 479 * list = eina_list_prepend_relative(list, my_data, relative_member);
505 * if (eina_error_get())
506 * {
507 * fprintf(stderr, "ERROR: Memory is low. List allocation failed.\n");
508 * exit(-1);
509 * }
510 * @endcode 480 * @endcode
511 * 481 *
512 * @warning @p list must be a pointer to the first element of the list. 482 * @warning @p list must be a pointer to the first element of the list.
@@ -548,7 +518,7 @@ EAPI Eina_List *eina_list_prepend_relative_list(Eina_List *list, cons
548 * sorted and the result will be sorted. If @p list is @c NULLL, a new 518 * sorted and the result will be sorted. If @p list is @c NULLL, a new
549 * list is returned. On success, a new list pointer that should be 519 * list is returned. On success, a new list pointer that should be
550 * used in place of the one given to this function is 520 * used in place of the one given to this function is
551 * returned. Otherwise, the old pointer is returned. See eina_error_get(). 521 * returned. Otherwise, the old pointer is returned.
552 * 522 *
553 * @note O(log2(n)) comparisons (calls to @p func) average/worst case 523 * @note O(log2(n)) comparisons (calls to @p func) average/worst case
554 * performance as it uses eina_list_search_sorted_near_list() and thus 524 * performance as it uses eina_list_search_sorted_near_list() and thus
@@ -1310,9 +1280,8 @@ static inline unsigned int eina_list_count(const Eina_List *list) EINA_PURE;
1310 * will always return false on eina_iterator_next(), thus keeping API 1280 * will always return false on eina_iterator_next(), thus keeping API
1311 * sane. 1281 * sane.
1312 * 1282 *
1313 * If the memory can not be allocated, NULL is returned 1283 * If the memory can not be allocated, NULL is returned.
1314 * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator 1284 * Otherwise, a valid iterator is returned.
1315 * is returned.
1316 * 1285 *
1317 * @warning @p list must be a pointer to the first element of the list. 1286 * @warning @p list must be a pointer to the first element of the list.
1318 * 1287 *
@@ -1337,9 +1306,8 @@ EAPI Eina_Iterator *eina_list_iterator_new(const Eina_List *list) EINA_MA
1337 * 1306 *
1338 * Unlike eina_list_iterator_new(), this will walk the list backwards. 1307 * Unlike eina_list_iterator_new(), this will walk the list backwards.
1339 * 1308 *
1340 * If the memory can not be allocated, NULL is returned 1309 * If the memory can not be allocated, NULL is returned.
1341 * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator 1310 * Otherwise, a valid iterator is returned.
1342 * is returned.
1343 * 1311 *
1344 * @warning @p list must be a pointer to the first element of the list. 1312 * @warning @p list must be a pointer to the first element of the list.
1345 * 1313 *
@@ -1359,8 +1327,8 @@ EAPI Eina_Iterator *eina_list_iterator_reversed_new(const Eina_List *list
1359 * This function returns a newly allocated accessor associated to 1327 * This function returns a newly allocated accessor associated to
1360 * @p list. If @p list is @c NULL or the count member of @p list is 1328 * @p list. If @p list is @c NULL or the count member of @p list is
1361 * less or equal than 0, this function returns @c NULL. If the memory can 1329 * less or equal than 0, this function returns @c NULL. If the memory can
1362 * not be allocated, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is 1330 * not be allocated, @c NULL is returned Otherwise, a valid accessor is
1363 * set. Otherwise, a valid accessor is returned. 1331 * returned.
1364 * 1332 *
1365 * @warning @p list must be a pointer to the first element of the list. 1333 * @warning @p list must be a pointer to the first element of the list.
1366 */ 1334 */
diff --git a/src/lib/eina/eina_lock.h b/src/lib/eina/eina_lock.h
index 3e4a510252..b0afa4193f 100644
--- a/src/lib/eina/eina_lock.h
+++ b/src/lib/eina/eina_lock.h
@@ -129,7 +129,6 @@ static inline void eina_spinlock_free(Eina_Spinlock *spinlock);
129 do { \ 129 do { \
130 if (EINA_UNLIKELY(!eina_main_loop_is())) \ 130 if (EINA_UNLIKELY(!eina_main_loop_is())) \
131 { \ 131 { \
132 eina_error_set(EINA_ERROR_NOT_MAIN_LOOP); \
133 EINA_LOG_ERR("You are calling %s from outside" \ 132 EINA_LOG_ERR("You are calling %s from outside" \
134 "of the main loop threads in %s at line %i", \ 133 "of the main loop threads in %s at line %i", \
135 __FUNCTION__, \ 134 __FUNCTION__, \
@@ -142,7 +141,6 @@ static inline void eina_spinlock_free(Eina_Spinlock *spinlock);
142 do { \ 141 do { \
143 if (EINA_UNLIKELY(!eina_main_loop_is())) \ 142 if (EINA_UNLIKELY(!eina_main_loop_is())) \
144 { \ 143 { \
145 eina_error_set(EINA_ERROR_NOT_MAIN_LOOP); \
146 EINA_LOG_ERR("You are calling %s from outside" \ 144 EINA_LOG_ERR("You are calling %s from outside" \
147 "of the main loop threads in %s at line %i", \ 145 "of the main loop threads in %s at line %i", \
148 __FUNCTION__, \ 146 __FUNCTION__, \
diff --git a/src/lib/eina/eina_magic.c b/src/lib/eina/eina_magic.c
index ee9c9e2ed4..f228dbd5d9 100644
--- a/src/lib/eina/eina_magic.c
+++ b/src/lib/eina/eina_magic.c
@@ -29,7 +29,6 @@
29 29
30#include "eina_config.h" 30#include "eina_config.h"
31#include "eina_private.h" 31#include "eina_private.h"
32#include "eina_error.h"
33#include "eina_log.h" 32#include "eina_log.h"
34 33
35/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ 34/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
@@ -126,8 +125,6 @@ _eina_magic_strings_alloc(void)
126 125
127EAPI Eina_Error EINA_ERROR_MAGIC_FAILED = 0; 126EAPI Eina_Error EINA_ERROR_MAGIC_FAILED = 0;
128 127
129static const char EINA_ERROR_MAGIC_FAILED_STR[] = "Magic check failed.";
130
131/** 128/**
132 * @internal 129 * @internal
133 * @brief Initialize the magic string module. 130 * @brief Initialize the magic string module.
@@ -149,9 +146,6 @@ eina_magic_string_init(void)
149 EINA_LOG_ERR("Could not register log domain: eina_magic_string"); 146 EINA_LOG_ERR("Could not register log domain: eina_magic_string");
150 return EINA_FALSE; 147 return EINA_FALSE;
151 } 148 }
152 EINA_ERROR_MAGIC_FAILED = eina_error_msg_static_register(
153 EINA_ERROR_MAGIC_FAILED_STR);
154
155 return EINA_TRUE; 149 return EINA_TRUE;
156} 150}
157 151
@@ -272,7 +266,6 @@ eina_magic_fail(void *d,
272 const char *fnc, 266 const char *fnc,
273 int line) 267 int line)
274{ 268{
275 eina_error_set(EINA_ERROR_MAGIC_FAILED);
276 if (!d) 269 if (!d)
277 eina_log_print(EINA_LOG_DOMAIN_GLOBAL, EINA_LOG_LEVEL_ERR, 270 eina_log_print(EINA_LOG_DOMAIN_GLOBAL, EINA_LOG_LEVEL_ERR,
278 file, fnc, line, 271 file, fnc, line,
diff --git a/src/lib/eina/eina_magic.h b/src/lib/eina/eina_magic.h
index 5e8d37663b..847f7e0a59 100644
--- a/src/lib/eina/eina_magic.h
+++ b/src/lib/eina/eina_magic.h
@@ -201,13 +201,8 @@ EAPI Eina_Bool eina_magic_string_static_set(Eina_Magic magic,
201 */ 201 */
202#define EINA_MAGIC_NONE 0x1234fedc 202#define EINA_MAGIC_NONE 0x1234fedc
203 203
204/**
205 * @var EINA_ERROR_MAGIC_FAILED
206 * Error identifier corresponding to magic check failure.
207 */
208EAPI extern Eina_Error EINA_ERROR_MAGIC_FAILED; 204EAPI extern Eina_Error EINA_ERROR_MAGIC_FAILED;
209 205
210
211#ifdef EINA_MAGIC_DEBUG 206#ifdef EINA_MAGIC_DEBUG
212 207
213/** 208/**
diff --git a/src/lib/eina/eina_main.c b/src/lib/eina/eina_main.c
index 321946000e..808e02e913 100644
--- a/src/lib/eina/eina_main.c
+++ b/src/lib/eina/eina_main.c
@@ -102,8 +102,6 @@ EAPI Eina_Bool _eina_threads_activated = EINA_FALSE;
102EAPI Eina_Error EINA_ERROR_NOT_MAIN_LOOP = 0; 102EAPI Eina_Error EINA_ERROR_NOT_MAIN_LOOP = 0;
103EAPI unsigned int eina_seed = 0; 103EAPI unsigned int eina_seed = 0;
104 104
105static const char EINA_ERROR_NOT_MAIN_LOOP_STR[] = "Main loop thread check failed.";
106
107#ifdef EFL_HAVE_THREADS 105#ifdef EFL_HAVE_THREADS
108# ifdef _WIN32 106# ifdef _WIN32
109EAPI DWORD _eina_main_loop; 107EAPI DWORD _eina_main_loop;
@@ -279,9 +277,6 @@ eina_init(void)
279 return 0; 277 return 0;
280 } 278 }
281 279
282 EINA_ERROR_NOT_MAIN_LOOP = eina_error_msg_static_register(
283 EINA_ERROR_NOT_MAIN_LOOP_STR);
284
285#ifdef EFL_HAVE_THREADS 280#ifdef EFL_HAVE_THREADS
286# ifdef _WIN32 281# ifdef _WIN32
287 _eina_main_loop = GetCurrentThreadId(); 282 _eina_main_loop = GetCurrentThreadId();
diff --git a/src/lib/eina/eina_matrixsparse.c b/src/lib/eina/eina_matrixsparse.c
index d287545136..e82212bc2b 100644
--- a/src/lib/eina/eina_matrixsparse.c
+++ b/src/lib/eina/eina_matrixsparse.c
@@ -39,7 +39,6 @@
39 39
40#include "eina_config.h" 40#include "eina_config.h"
41#include "eina_private.h" 41#include "eina_private.h"
42#include "eina_error.h"
43#include "eina_log.h" 42#include "eina_log.h"
44#include "eina_magic.h" 43#include "eina_magic.h"
45#include "eina_mempool.h" 44#include "eina_mempool.h"
@@ -943,11 +942,7 @@ eina_matrixsparse_new(unsigned long rows, unsigned long cols, void (*free_func)(
943 EINA_SAFETY_ON_FALSE_RETURN_VAL(cols > 0, NULL); 942 EINA_SAFETY_ON_FALSE_RETURN_VAL(cols > 0, NULL);
944 943
945 m = malloc(sizeof(Eina_Matrixsparse)); 944 m = malloc(sizeof(Eina_Matrixsparse));
946 if (!m) 945 if (!m) return NULL;
947 {
948 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
949 return NULL;
950 }
951 946
952 EINA_MAGIC_SET(m, EINA_MAGIC_MATRIXSPARSE); 947 EINA_MAGIC_SET(m, EINA_MAGIC_MATRIXSPARSE);
953 948
@@ -960,7 +955,6 @@ eina_matrixsparse_new(unsigned long rows, unsigned long cols, void (*free_func)(
960 m->free.func = free_func; 955 m->free.func = free_func;
961 m->free.user_data = (void *)user_data; 956 m->free.user_data = (void *)user_data;
962 957
963 eina_error_set(0);
964 return m; 958 return m;
965} 959}
966 960
@@ -1364,11 +1358,7 @@ eina_matrixsparse_iterator_new(const Eina_Matrixsparse *m)
1364 Eina_Matrixsparse_Iterator *it; 1358 Eina_Matrixsparse_Iterator *it;
1365 1359
1366 it = calloc(1, sizeof(*it)); 1360 it = calloc(1, sizeof(*it));
1367 if (!it) 1361 if (!it) return NULL;
1368 {
1369 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
1370 return NULL;
1371 }
1372 1362
1373 EINA_MAGIC_SET(it, EINA_MAGIC_MATRIXSPARSE_ITERATOR); 1363 EINA_MAGIC_SET(it, EINA_MAGIC_MATRIXSPARSE_ITERATOR);
1374 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); 1364 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
@@ -1391,11 +1381,7 @@ eina_matrixsparse_iterator_complete_new(const Eina_Matrixsparse *m)
1391 Eina_Matrixsparse_Iterator_Complete *it; 1381 Eina_Matrixsparse_Iterator_Complete *it;
1392 1382
1393 it = calloc(1, sizeof(*it)); 1383 it = calloc(1, sizeof(*it));
1394 if (!it) 1384 if (!it) return NULL;
1395 {
1396 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
1397 return NULL;
1398 }
1399 1385
1400 EINA_MAGIC_SET(it, EINA_MAGIC_MATRIXSPARSE_ITERATOR); 1386 EINA_MAGIC_SET(it, EINA_MAGIC_MATRIXSPARSE_ITERATOR);
1401 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); 1387 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
diff --git a/src/lib/eina/eina_matrixsparse.h b/src/lib/eina/eina_matrixsparse.h
index e7db606400..5523c0fb31 100644
--- a/src/lib/eina/eina_matrixsparse.h
+++ b/src/lib/eina/eina_matrixsparse.h
@@ -87,8 +87,7 @@ typedef struct _Eina_Matrixsparse_Cell Eina_Matrixsparse_Cell;
87 * eina_matrixsparse_cell_idx_clear() and possible others. 87 * eina_matrixsparse_cell_idx_clear() and possible others.
88 * @param user_data given to @a free_func as first parameter. 88 * @param user_data given to @a free_func as first parameter.
89 * 89 *
90 * @return Newly allocated matrix or @c NULL if allocation failed and eina_error 90 * @return Newly allocated matrix or @c NULL if allocation failed.
91 * is set.
92 */ 91 */
93EAPI Eina_Matrixsparse *eina_matrixsparse_new(unsigned long rows, 92EAPI Eina_Matrixsparse *eina_matrixsparse_new(unsigned long rows,
94 unsigned long cols, 93 unsigned long cols,
diff --git a/src/lib/eina/eina_mempool.c b/src/lib/eina/eina_mempool.c
index 55723a48c7..1757975362 100644
--- a/src/lib/eina/eina_mempool.c
+++ b/src/lib/eina/eina_mempool.c
@@ -68,9 +68,6 @@ _new_va(const char *name,
68 Eina_Mempool_Backend *be = NULL; 68 Eina_Mempool_Backend *be = NULL;
69 Eina_Mempool *mp; 69 Eina_Mempool *mp;
70 70
71 Eina_Error err = EINA_ERROR_NOT_MEMPOOL_MODULE;
72
73 eina_error_set(0);
74 if (getenv("EINA_MEMPOOL_PASS")) 71 if (getenv("EINA_MEMPOOL_PASS"))
75 { 72 {
76 be = eina_hash_find(_backends, "pass_through"); 73 be = eina_hash_find(_backends, "pass_through");
@@ -79,10 +76,8 @@ _new_va(const char *name,
79 else be = eina_hash_find(_backends, name); 76 else be = eina_hash_find(_backends, name);
80 if ((!be) || (!be->init)) goto on_error; 77 if ((!be) || (!be->init)) goto on_error;
81 78
82 err = EINA_ERROR_OUT_OF_MEMORY;
83 mp = calloc(1, sizeof(Eina_Mempool)); 79 mp = calloc(1, sizeof(Eina_Mempool));
84 if (!mp) 80 if (!mp) goto on_error;
85 goto on_error;
86 81
87 /* Work around ABI incompability introduced in Eina 1.1 */ 82 /* Work around ABI incompability introduced in Eina 1.1 */
88#define SBP(Property) mp->backend.Property = be->Property; 83#define SBP(Property) mp->backend.Property = be->Property;
@@ -104,11 +99,9 @@ _new_va(const char *name,
104 } 99 }
105 100
106 mp->backend_data = mp->backend.init(context, options, args); 101 mp->backend_data = mp->backend.init(context, options, args);
107
108 return mp; 102 return mp;
109 103
110on_error: 104on_error:
111 eina_error_set(err);
112 return NULL; 105 return NULL;
113} 106}
114 107
@@ -143,9 +136,6 @@ void pass_through_shutdown(void);
143 136
144EAPI Eina_Error EINA_ERROR_NOT_MEMPOOL_MODULE = 0; 137EAPI Eina_Error EINA_ERROR_NOT_MEMPOOL_MODULE = 0;
145 138
146static const char EINA_ERROR_NOT_MEMPOOL_MODULE_STR[] =
147 "Not a memory pool module.";
148
149/** 139/**
150 * @endcond 140 * @endcond
151 */ 141 */
@@ -179,8 +169,6 @@ eina_mempool_init(void)
179 return 0; 169 return 0;
180 } 170 }
181 171
182 EINA_ERROR_NOT_MEMPOOL_MODULE = eina_error_msg_static_register(
183 EINA_ERROR_NOT_MEMPOOL_MODULE_STR);
184 _backends = eina_hash_string_superfast_new(NULL); 172 _backends = eina_hash_string_superfast_new(NULL);
185 173
186 /* dynamic backends */ 174 /* dynamic backends */
diff --git a/src/lib/eina/eina_model.c b/src/lib/eina/eina_model.c
index 4d7f341f27..e1931fdc68 100644
--- a/src/lib/eina/eina_model.c
+++ b/src/lib/eina/eina_model.c
@@ -27,7 +27,6 @@
27#include "eina_config.h" 27#include "eina_config.h"
28#include "eina_private.h" 28#include "eina_private.h"
29#include "eina_alloca.h" 29#include "eina_alloca.h"
30#include "eina_error.h"
31#include "eina_log.h" 30#include "eina_log.h"
32#include "eina_mempool.h" 31#include "eina_mempool.h"
33#include "eina_lock.h" 32#include "eina_lock.h"
@@ -1204,10 +1203,6 @@ _eina_model_event_callback_call(Eina_Model *model, const char *name, const void
1204 return EINA_FALSE; 1203 return EINA_FALSE;
1205} 1204}
1206 1205
1207static const char EINA_ERROR_MODEL_FAILED_STR[] = "Model check failed.";
1208static const char EINA_ERROR_MODEL_METHOD_MISSING_STR[] = "Model method is missing.";
1209static const char EINA_MAGIC_MODEL_STR[] = "Eina Model";
1210
1211static void _eina_model_unref(Eina_Model *model); 1206static void _eina_model_unref(Eina_Model *model);
1212 1207
1213/** 1208/**
@@ -1422,7 +1417,7 @@ _eina_model_type_base_properties_compare(const Eina_Model *a, const Eina_Model *
1422 } 1417 }
1423 1418
1424 *cmp = eina_value_compare(&atmp, &btmp); 1419 *cmp = eina_value_compare(&atmp, &btmp);
1425 if (eina_error_get() != 0) 1420 if (*cmp == -2)
1426 { 1421 {
1427 char *astr = eina_value_to_string(&atmp); 1422 char *astr = eina_value_to_string(&atmp);
1428 char *bstr = eina_value_to_string(&btmp); 1423 char *bstr = eina_value_to_string(&btmp);
@@ -1509,7 +1504,7 @@ _eina_model_type_base_children_compare(const Eina_Model *a, const Eina_Model *b,
1509 } 1504 }
1510 1505
1511 *cmp = eina_model_compare(achild, bchild); 1506 *cmp = eina_model_compare(achild, bchild);
1512 if (eina_error_get()) 1507 if (*cmp == -2)
1513 { 1508 {
1514 ERR("Could not compare children #%d %p (%s) and %p (%s) " 1509 ERR("Could not compare children #%d %p (%s) and %p (%s) "
1515 "from models %p (%s) and %p (%s)", i, 1510 "from models %p (%s) and %p (%s)", i,
@@ -3035,11 +3030,6 @@ eina_model_init(void)
3035 goto on_init_fail_lock_debug; 3030 goto on_init_fail_lock_debug;
3036 } 3031 }
3037 3032
3038 EINA_ERROR_MODEL_FAILED = eina_error_msg_static_register(
3039 EINA_ERROR_MODEL_FAILED_STR);
3040 EINA_ERROR_MODEL_METHOD_MISSING = eina_error_msg_static_register(
3041 EINA_ERROR_MODEL_METHOD_MISSING_STR);
3042
3043 EINA_MODEL_TYPE_BASE = &_EINA_MODEL_TYPE_BASE; 3033 EINA_MODEL_TYPE_BASE = &_EINA_MODEL_TYPE_BASE;
3044 EINA_MODEL_TYPE_MIXIN = &_EINA_MODEL_TYPE_MIXIN; 3034 EINA_MODEL_TYPE_MIXIN = &_EINA_MODEL_TYPE_MIXIN;
3045 EINA_MODEL_TYPE_GENERIC = &_EINA_MODEL_TYPE_GENERIC; 3035 EINA_MODEL_TYPE_GENERIC = &_EINA_MODEL_TYPE_GENERIC;
@@ -3430,7 +3420,6 @@ _eina_model_unref(Eina_Model *model)
3430#define EINA_MODEL_TYPE_CALL_OPTIONAL_RETURN(model, method, def_retval, ...) \ 3420#define EINA_MODEL_TYPE_CALL_OPTIONAL_RETURN(model, method, def_retval, ...) \
3431 do \ 3421 do \
3432 { \ 3422 { \
3433 eina_error_set(0); \
3434 if (model->desc->ops.type.method) \ 3423 if (model->desc->ops.type.method) \
3435 return model->desc->ops.type.method(model, ## __VA_ARGS__); \ 3424 return model->desc->ops.type.method(model, ## __VA_ARGS__); \
3436 DBG("Optional method" # method "() not implemented for model %p (%s)", \ 3425 DBG("Optional method" # method "() not implemented for model %p (%s)", \
@@ -3442,7 +3431,6 @@ _eina_model_unref(Eina_Model *model)
3442#define EINA_MODEL_TYPE_CALL_OPTIONAL(model, method, ...) \ 3431#define EINA_MODEL_TYPE_CALL_OPTIONAL(model, method, ...) \
3443 do \ 3432 do \
3444 { \ 3433 { \
3445 eina_error_set(0); \
3446 if (model->desc->ops.type.method) \ 3434 if (model->desc->ops.type.method) \
3447 model->desc->ops.type.method(model, ## __VA_ARGS__); \ 3435 model->desc->ops.type.method(model, ## __VA_ARGS__); \
3448 else \ 3436 else \
@@ -3454,10 +3442,8 @@ _eina_model_unref(Eina_Model *model)
3454#define EINA_MODEL_TYPE_CALL_MANDATORY_RETURN(model, method, def_retval, ...) \ 3442#define EINA_MODEL_TYPE_CALL_MANDATORY_RETURN(model, method, def_retval, ...) \
3455 do \ 3443 do \
3456 { \ 3444 { \
3457 eina_error_set(0); \
3458 if (model->desc->ops.type.method) \ 3445 if (model->desc->ops.type.method) \
3459 return model->desc->ops.type.method(model, ## __VA_ARGS__); \ 3446 return model->desc->ops.type.method(model, ## __VA_ARGS__); \
3460 eina_error_set(EINA_ERROR_MODEL_METHOD_MISSING); \
3461 CRITICAL("Mandatory method" # method "() not implemented for model %p (%s)", \ 3447 CRITICAL("Mandatory method" # method "() not implemented for model %p (%s)", \
3462 model, model->desc->cache.types[0]->name); \ 3448 model, model->desc->cache.types[0]->name); \
3463 return def_retval; \ 3449 return def_retval; \
@@ -3467,12 +3453,10 @@ _eina_model_unref(Eina_Model *model)
3467#define EINA_MODEL_TYPE_CALL_MANDATORY(model, method, ...) \ 3453#define EINA_MODEL_TYPE_CALL_MANDATORY(model, method, ...) \
3468 do \ 3454 do \
3469 { \ 3455 { \
3470 eina_error_set(0); \
3471 if (model->desc->ops.type.method) \ 3456 if (model->desc->ops.type.method) \
3472 model->desc->ops.type.method(model, ## __VA_ARGS__); \ 3457 model->desc->ops.type.method(model, ## __VA_ARGS__); \
3473 else \ 3458 else \
3474 { \ 3459 { \
3475 eina_error_set(EINA_ERROR_MODEL_METHOD_MISSING); \
3476 CRITICAL("Mandatory method" # method "() not implemented for model %p (%s)", \ 3460 CRITICAL("Mandatory method" # method "() not implemented for model %p (%s)", \
3477 model, model->desc->cache.types[0]->name); \ 3461 model, model->desc->cache.types[0]->name); \
3478 } \ 3462 } \
@@ -3483,10 +3467,8 @@ _eina_model_unref(Eina_Model *model)
3483#define EINA_MODEL_TYPE_CALL_RETURN(model, method, def_retval, ...) \ 3467#define EINA_MODEL_TYPE_CALL_RETURN(model, method, def_retval, ...) \
3484 do \ 3468 do \
3485 { \ 3469 { \
3486 eina_error_set(0); \
3487 if (model->desc->ops.type.method) \ 3470 if (model->desc->ops.type.method) \
3488 return model->desc->ops.type.method(model, ## __VA_ARGS__); \ 3471 return model->desc->ops.type.method(model, ## __VA_ARGS__); \
3489 eina_error_set(EINA_ERROR_MODEL_METHOD_MISSING); \
3490 ERR("Method" # method "() not implemented for model %p (%s)", \ 3472 ERR("Method" # method "() not implemented for model %p (%s)", \
3491 model, model->desc->cache.types[0]->name); \ 3473 model, model->desc->cache.types[0]->name); \
3492 return def_retval; \ 3474 return def_retval; \
@@ -3496,12 +3478,10 @@ _eina_model_unref(Eina_Model *model)
3496#define EINA_MODEL_TYPE_CALL(model, method, ...) \ 3478#define EINA_MODEL_TYPE_CALL(model, method, ...) \
3497 do \ 3479 do \
3498 { \ 3480 { \
3499 eina_error_set(0); \
3500 if (model->desc->ops.type.method) \ 3481 if (model->desc->ops.type.method) \
3501 model->desc->ops.type.method(model, ## __VA_ARGS__); \ 3482 model->desc->ops.type.method(model, ## __VA_ARGS__); \
3502 else \ 3483 else \
3503 { \ 3484 { \
3504 eina_error_set(EINA_ERROR_MODEL_METHOD_MISSING); \
3505 ERR("Method" # method "() not implemented for model %p (%s)", \ 3485 ERR("Method" # method "() not implemented for model %p (%s)", \
3506 model, model->desc->cache.types[0]->name); \ 3486 model, model->desc->cache.types[0]->name); \
3507 } \ 3487 } \
@@ -3985,8 +3965,7 @@ eina_model_compare(const Eina_Model *a, const Eina_Model *b)
3985 ERR("Models %p (%s) and %p (%s) can't compare", 3965 ERR("Models %p (%s) and %p (%s) can't compare",
3986 a, desc_a->cache.types[0]->name, 3966 a, desc_a->cache.types[0]->name,
3987 b, desc_b->cache.types[0]->name); 3967 b, desc_b->cache.types[0]->name);
3988 eina_error_set(EINA_ERROR_MODEL_METHOD_MISSING); 3968 return -2;
3989 return -1;
3990 } 3969 }
3991 else if ((desc_a->ops.type.compare) && (desc_b->ops.type.compare)) 3970 else if ((desc_a->ops.type.compare) && (desc_b->ops.type.compare))
3992 { 3971 {
@@ -4012,8 +3991,7 @@ eina_model_compare(const Eina_Model *a, const Eina_Model *b)
4012 ERR("Could not compare models %p (%s) and %p (%s)", 3991 ERR("Could not compare models %p (%s) and %p (%s)",
4013 a, desc_a->cache.types[0]->name, 3992 a, desc_a->cache.types[0]->name,
4014 b, desc_b->cache.types[0]->name); 3993 b, desc_b->cache.types[0]->name);
4015 eina_error_set(EINA_ERROR_MODEL_FAILED); 3994 return -2;
4016 return -1;
4017 } 3995 }
4018 3996
4019 return cmp; 3997 return cmp;
@@ -4026,7 +4004,6 @@ eina_model_load(Eina_Model *model)
4026 4004
4027 EINA_MODEL_INSTANCE_CHECK_VAL(model, EINA_FALSE); 4005 EINA_MODEL_INSTANCE_CHECK_VAL(model, EINA_FALSE);
4028 4006
4029 eina_error_set(0);
4030 if (model->desc->ops.type.load) 4007 if (model->desc->ops.type.load)
4031 { 4008 {
4032 ret = model->desc->ops.type.load(model); 4009 ret = model->desc->ops.type.load(model);
@@ -4035,7 +4012,6 @@ eina_model_load(Eina_Model *model)
4035 } 4012 }
4036 else 4013 else
4037 { 4014 {
4038 eina_error_set(EINA_ERROR_MODEL_METHOD_MISSING);
4039 ret = EINA_FALSE; 4015 ret = EINA_FALSE;
4040 ERR("Method load() not implemented for model %p (%s)", 4016 ERR("Method load() not implemented for model %p (%s)",
4041 model, model->desc->cache.types[0]->name); 4017 model, model->desc->cache.types[0]->name);
@@ -4051,7 +4027,6 @@ eina_model_unload(Eina_Model *model)
4051 4027
4052 EINA_MODEL_INSTANCE_CHECK_VAL(model, EINA_FALSE); 4028 EINA_MODEL_INSTANCE_CHECK_VAL(model, EINA_FALSE);
4053 4029
4054 eina_error_set(0);
4055 if (model->desc->ops.type.unload) 4030 if (model->desc->ops.type.unload)
4056 { 4031 {
4057 ret = model->desc->ops.type.unload(model); 4032 ret = model->desc->ops.type.unload(model);
@@ -4061,7 +4036,6 @@ eina_model_unload(Eina_Model *model)
4061 } 4036 }
4062 else 4037 else
4063 { 4038 {
4064 eina_error_set(EINA_ERROR_MODEL_METHOD_MISSING);
4065 ret = EINA_FALSE; 4039 ret = EINA_FALSE;
4066 ERR("Method unload() not implemented for model %p (%s)", 4040 ERR("Method unload() not implemented for model %p (%s)",
4067 model, model->desc->cache.types[0]->name); 4041 model, model->desc->cache.types[0]->name);
@@ -4090,7 +4064,6 @@ eina_model_property_set(Eina_Model *model, const const char *name, const Eina_Va
4090 EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE); 4064 EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE);
4091 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(value->type), EINA_FALSE); 4065 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(value->type), EINA_FALSE);
4092 4066
4093 eina_error_set(0);
4094 if (model->desc->ops.type.property_set) 4067 if (model->desc->ops.type.property_set)
4095 { 4068 {
4096 ret = model->desc->ops.type.property_set(model, name, value); 4069 ret = model->desc->ops.type.property_set(model, name, value);
@@ -4100,7 +4073,6 @@ eina_model_property_set(Eina_Model *model, const const char *name, const Eina_Va
4100 } 4073 }
4101 else 4074 else
4102 { 4075 {
4103 eina_error_set(EINA_ERROR_MODEL_METHOD_MISSING);
4104 ret = EINA_FALSE; 4076 ret = EINA_FALSE;
4105 ERR("Method property_set() not implemented for model %p (%s)", 4077 ERR("Method property_set() not implemented for model %p (%s)",
4106 model, model->desc->cache.types[0]->name); 4078 model, model->desc->cache.types[0]->name);
@@ -4117,7 +4089,6 @@ eina_model_property_del(Eina_Model *model, const char *name)
4117 EINA_MODEL_INSTANCE_CHECK_VAL(model, EINA_FALSE); 4089 EINA_MODEL_INSTANCE_CHECK_VAL(model, EINA_FALSE);
4118 EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE); 4090 EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
4119 4091
4120 eina_error_set(0);
4121 if (model->desc->ops.type.property_del) 4092 if (model->desc->ops.type.property_del)
4122 { 4093 {
4123 ret = model->desc->ops.type.property_del(model, name); 4094 ret = model->desc->ops.type.property_del(model, name);
@@ -4127,7 +4098,6 @@ eina_model_property_del(Eina_Model *model, const char *name)
4127 } 4098 }
4128 else 4099 else
4129 { 4100 {
4130 eina_error_set(EINA_ERROR_MODEL_METHOD_MISSING);
4131 ret = EINA_FALSE; 4101 ret = EINA_FALSE;
4132 ERR("Method property_del() not implemented for model %p (%s)", 4102 ERR("Method property_del() not implemented for model %p (%s)",
4133 model, model->desc->cache.types[0]->name); 4103 model, model->desc->cache.types[0]->name);
@@ -4173,7 +4143,6 @@ eina_model_child_set(Eina_Model *model, unsigned int position, Eina_Model *child
4173 EINA_MODEL_INSTANCE_CHECK_VAL(model, EINA_FALSE); 4143 EINA_MODEL_INSTANCE_CHECK_VAL(model, EINA_FALSE);
4174 EINA_MODEL_INSTANCE_CHECK_VAL(child, EINA_FALSE); 4144 EINA_MODEL_INSTANCE_CHECK_VAL(child, EINA_FALSE);
4175 4145
4176 eina_error_set(0);
4177 if (model->desc->ops.type.child_set) 4146 if (model->desc->ops.type.child_set)
4178 { 4147 {
4179 ret = model->desc->ops.type.child_set(model, position, child); 4148 ret = model->desc->ops.type.child_set(model, position, child);
@@ -4183,7 +4152,6 @@ eina_model_child_set(Eina_Model *model, unsigned int position, Eina_Model *child
4183 } 4152 }
4184 else 4153 else
4185 { 4154 {
4186 eina_error_set(EINA_ERROR_MODEL_METHOD_MISSING);
4187 ret = EINA_FALSE; 4155 ret = EINA_FALSE;
4188 ERR("Method child_set() not implemented for model %p (%s)", 4156 ERR("Method child_set() not implemented for model %p (%s)",
4189 model, model->desc->cache.types[0]->name); 4157 model, model->desc->cache.types[0]->name);
@@ -4199,7 +4167,6 @@ eina_model_child_del(Eina_Model *model, unsigned int position)
4199 4167
4200 EINA_MODEL_INSTANCE_CHECK_VAL(model, EINA_FALSE); 4168 EINA_MODEL_INSTANCE_CHECK_VAL(model, EINA_FALSE);
4201 4169
4202 eina_error_set(0);
4203 if (model->desc->ops.type.child_del) 4170 if (model->desc->ops.type.child_del)
4204 { 4171 {
4205 ret = model->desc->ops.type.child_del(model, position); 4172 ret = model->desc->ops.type.child_del(model, position);
@@ -4213,7 +4180,6 @@ eina_model_child_del(Eina_Model *model, unsigned int position)
4213 } 4180 }
4214 else 4181 else
4215 { 4182 {
4216 eina_error_set(EINA_ERROR_MODEL_METHOD_MISSING);
4217 ret = EINA_FALSE; 4183 ret = EINA_FALSE;
4218 ERR("Method child_del() not implemented for model %p (%s)", 4184 ERR("Method child_del() not implemented for model %p (%s)",
4219 model, model->desc->cache.types[0]->name); 4185 model, model->desc->cache.types[0]->name);
@@ -4230,7 +4196,6 @@ eina_model_child_insert_at(Eina_Model *model, unsigned int position, Eina_Model
4230 EINA_MODEL_INSTANCE_CHECK_VAL(model, EINA_FALSE); 4196 EINA_MODEL_INSTANCE_CHECK_VAL(model, EINA_FALSE);
4231 EINA_SAFETY_ON_NULL_RETURN_VAL(child, EINA_FALSE); 4197 EINA_SAFETY_ON_NULL_RETURN_VAL(child, EINA_FALSE);
4232 4198
4233 eina_error_set(0);
4234 if (model->desc->ops.type.child_insert_at) 4199 if (model->desc->ops.type.child_insert_at)
4235 { 4200 {
4236 ret = model->desc->ops.type.child_insert_at(model, position, child); 4201 ret = model->desc->ops.type.child_insert_at(model, position, child);
@@ -4244,7 +4209,6 @@ eina_model_child_insert_at(Eina_Model *model, unsigned int position, Eina_Model
4244 } 4209 }
4245 else 4210 else
4246 { 4211 {
4247 eina_error_set(EINA_ERROR_MODEL_METHOD_MISSING);
4248 ret = EINA_FALSE; 4212 ret = EINA_FALSE;
4249 ERR("Method child_insert_at() not implemented for model %p (%s)", 4213 ERR("Method child_insert_at() not implemented for model %p (%s)",
4250 model, model->desc->cache.types[0]->name); 4214 model, model->desc->cache.types[0]->name);
@@ -4266,7 +4230,6 @@ eina_model_child_append(Eina_Model *model, Eina_Model *child)
4266 if (position < 0) 4230 if (position < 0)
4267 return -1; 4231 return -1;
4268 4232
4269 eina_error_set(0);
4270 if (model->desc->ops.type.child_insert_at) 4233 if (model->desc->ops.type.child_insert_at)
4271 { 4234 {
4272 ret = model->desc->ops.type.child_insert_at(model, position, child); 4235 ret = model->desc->ops.type.child_insert_at(model, position, child);
@@ -4280,7 +4243,6 @@ eina_model_child_append(Eina_Model *model, Eina_Model *child)
4280 } 4243 }
4281 else 4244 else
4282 { 4245 {
4283 eina_error_set(EINA_ERROR_MODEL_METHOD_MISSING);
4284 ret = EINA_FALSE; 4246 ret = EINA_FALSE;
4285 ERR("Method child_insert_at() not implemented for model %p (%s)", 4247 ERR("Method child_insert_at() not implemented for model %p (%s)",
4286 model, model->desc->cache.types[0]->name); 4248 model, model->desc->cache.types[0]->name);
diff --git a/src/lib/eina/eina_model.h b/src/lib/eina/eina_model.h
index 892a1d5ab3..b6229c1ce5 100644
--- a/src/lib/eina/eina_model.h
+++ b/src/lib/eina/eina_model.h
@@ -302,16 +302,7 @@
302 * @{ 302 * @{
303 */ 303 */
304 304
305/**
306 * @var EINA_ERROR_MODEL_FAILED
307 * Defined when model-specific errors happens.
308 */
309EAPI extern Eina_Error EINA_ERROR_MODEL_FAILED; 305EAPI extern Eina_Error EINA_ERROR_MODEL_FAILED;
310
311/**
312 * @var EINA_ERROR_MODEL_METHOD_MISSING
313 * Defined when model-specific errors happens.
314 */
315EAPI extern Eina_Error EINA_ERROR_MODEL_METHOD_MISSING; 306EAPI extern Eina_Error EINA_ERROR_MODEL_METHOD_MISSING;
316 307
317/** 308/**
diff --git a/src/lib/eina/eina_module.c b/src/lib/eina/eina_module.c
index 9289f71607..5a30e26452 100644
--- a/src/lib/eina/eina_module.c
+++ b/src/lib/eina/eina_module.c
@@ -45,7 +45,6 @@
45#include "eina_config.h" 45#include "eina_config.h"
46#include "eina_private.h" 46#include "eina_private.h"
47#include "eina_alloca.h" 47#include "eina_alloca.h"
48#include "eina_error.h"
49#include "eina_file.h" 48#include "eina_file.h"
50#include "eina_log.h" 49#include "eina_log.h"
51 50
@@ -188,11 +187,6 @@ static void _dir_arch_list_cb(const char *name, const char *path, void *data)
188 * @cond LOCAL 187 * @cond LOCAL
189 */ 188 */
190 189
191static const char EINA_ERROR_WRONG_MODULE_STR[] =
192 "Wrong file format or no file module found";
193static const char EINA_ERROR_MODULE_INIT_FAILED_STR[] =
194 "Module initialisation function failed";
195
196EAPI Eina_Error EINA_ERROR_WRONG_MODULE = 0; 190EAPI Eina_Error EINA_ERROR_WRONG_MODULE = 0;
197EAPI Eina_Error EINA_ERROR_MODULE_INIT_FAILED = 0; 191EAPI Eina_Error EINA_ERROR_MODULE_INIT_FAILED = 0;
198 192
@@ -209,8 +203,7 @@ EAPI Eina_Error EINA_ERROR_MODULE_INIT_FAILED = 0;
209 * This function sets up the module loader module of Eina. It is 203 * This function sets up the module loader module of Eina. It is
210 * called by eina_init(). 204 * called by eina_init().
211 * 205 *
212 * This function sets up the module module of Eina. It also registers 206 * This function sets up the module module of Eina.
213 * the errors #EINA_ERROR_WRONG_MODULE and #EINA_ERROR_MODULE_INIT_FAILED.
214 * 207 *
215 * @see eina_init() 208 * @see eina_init()
216 */ 209 */
@@ -224,12 +217,6 @@ eina_module_init(void)
224 EINA_LOG_ERR("Could not register log domain: eina_module"); 217 EINA_LOG_ERR("Could not register log domain: eina_module");
225 return EINA_FALSE; 218 return EINA_FALSE;
226 } 219 }
227
228#define EEMR(n) n = eina_error_msg_static_register(n ## _STR)
229 EEMR(EINA_ERROR_WRONG_MODULE);
230 EEMR(EINA_ERROR_MODULE_INIT_FAILED);
231#undef EEMR
232
233 return EINA_TRUE; 220 return EINA_TRUE;
234} 221}
235 222
@@ -321,7 +308,6 @@ EAPI Eina_Bool eina_module_load(Eina_Module *m)
321 { 308 {
322 WRN("could not dlopen(\"%s\", %s): %s", m->file, dlerror(), 309 WRN("could not dlopen(\"%s\", %s): %s", m->file, dlerror(),
323 (flag == RTLD_NOW) ? "RTLD_NOW" : "RTLD_LAZY"); 310 (flag == RTLD_NOW) ? "RTLD_NOW" : "RTLD_LAZY");
324 eina_error_set(EINA_ERROR_WRONG_MODULE);
325 return EINA_FALSE; 311 return EINA_FALSE;
326 } 312 }
327 313
@@ -334,7 +320,6 @@ EAPI Eina_Bool eina_module_load(Eina_Module *m)
334 320
335 WRN("could not find eina's entry symbol %s inside module %s, or the init function failed", 321 WRN("could not find eina's entry symbol %s inside module %s, or the init function failed",
336 EINA_MODULE_SYMBOL_INIT, m->file); 322 EINA_MODULE_SYMBOL_INIT, m->file);
337 eina_error_set(EINA_ERROR_MODULE_INIT_FAILED);
338 dlclose(dl_handle); 323 dlclose(dl_handle);
339 return EINA_FALSE; 324 return EINA_FALSE;
340ok: 325ok:
@@ -343,8 +328,6 @@ ok:
343loaded: 328loaded:
344 m->ref++; 329 m->ref++;
345 DBG("ref %d", m->ref); 330 DBG("ref %d", m->ref);
346
347 eina_error_set(0);
348 return EINA_TRUE; 331 return EINA_TRUE;
349#else 332#else
350 (void) m; 333 (void) m;
diff --git a/src/lib/eina/eina_module.h b/src/lib/eina/eina_module.h
index 24a491d6c1..6f9b08e74e 100644
--- a/src/lib/eina/eina_module.h
+++ b/src/lib/eina/eina_module.h
@@ -105,16 +105,7 @@ typedef void (*Eina_Module_Shutdown)(void);
105 */ 105 */
106#define EINA_MODULE_SHUTDOWN(f) EAPI Eina_Module_Shutdown __eina_module_shutdown = &f 106#define EINA_MODULE_SHUTDOWN(f) EAPI Eina_Module_Shutdown __eina_module_shutdown = &f
107 107
108/**
109 * @var EINA_ERROR_WRONG_MODULE
110 * Error identifier corresponding to a wrong module.
111 */
112extern EAPI Eina_Error EINA_ERROR_WRONG_MODULE; 108extern EAPI Eina_Error EINA_ERROR_WRONG_MODULE;
113
114/**
115 * @var EINA_ERROR_MODULE_INIT_FAILED
116 * Error identifier corresponding to a failure during the initialisation of a module.
117 */
118extern EAPI Eina_Error EINA_ERROR_MODULE_INIT_FAILED; 109extern EAPI Eina_Error EINA_ERROR_MODULE_INIT_FAILED;
119 110
120/** 111/**
@@ -156,13 +147,12 @@ EAPI Eina_Bool
156 * 147 *
157 * This function load the shared file object passed in 148 * This function load the shared file object passed in
158 * eina_module_new(). If it is a internal Eina module (like the 149 * eina_module_new(). If it is a internal Eina module (like the
159 * mempools), it also initialize it. It the shared file object can not 150 * mempools), it also initialize it. If the shared file object can not
160 * be loaded, the error #EINA_ERROR_WRONG_MODULE is set and 151 * be loaded, #EINA_FALSE is returned. If it is an internal Eina module and the
161 * and #EINA_FALSE is returned. If it is a internal Eina module and the 152 * module can not be initialized, #EINA_FALSE is returned. If the module has
162 * module can not be initialized, the error #EINA_ERROR_MODULE_INIT_FAILED 153 * already been loaded, it's reference counter is increased by one and
163 * is set and #EINA_FALSE is returned. If the module has already been loaded, 154 * #EINA_TRUE is returned. If @p module is @c NULL, the function returns
164 * it's reference counter is increased by one and #EINA_TRUE is returned. 155 * immediately #EINA_FALSE.
165 * If @p module is @c NULL, the function returns immediately #EINA_FALSE.
166 * 156 *
167 * When the symbols of the shared file objects are not needed 157 * When the symbols of the shared file objects are not needed
168 * anymore, call eina_module_unload() to unload the module. 158 * anymore, call eina_module_unload() to unload the module.
diff --git a/src/lib/eina/eina_rbtree.c b/src/lib/eina/eina_rbtree.c
index 394007f964..abf4ad0ce9 100644
--- a/src/lib/eina/eina_rbtree.c
+++ b/src/lib/eina/eina_rbtree.c
@@ -69,16 +69,11 @@ _eina_rbtree_iterator_list_new(Eina_Iterator_Rbtree *it, const Eina_Rbtree *tree
69{ 69{
70 Eina_Iterator_Rbtree_List *new; 70 Eina_Iterator_Rbtree_List *new;
71 71
72 eina_error_set(0);
73 new = eina_trash_pop(&it->trash); 72 new = eina_trash_pop(&it->trash);
74 if (!new) 73 if (!new)
75 { 74 {
76 new = malloc(sizeof (Eina_Iterator_Rbtree_List)); 75 new = malloc(sizeof (Eina_Iterator_Rbtree_List));
77 if (!new) 76 if (!new) return NULL;
78 {
79 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
80 return NULL;
81 }
82 } 77 }
83 78
84 new->tree = (Eina_Rbtree *)tree; 79 new->tree = (Eina_Rbtree *)tree;
@@ -195,13 +190,8 @@ _eina_rbtree_iterator_build(const Eina_Rbtree *root, unsigned char mask)
195 Eina_Iterator_Rbtree_List *first; 190 Eina_Iterator_Rbtree_List *first;
196 Eina_Iterator_Rbtree *it; 191 Eina_Iterator_Rbtree *it;
197 192
198 eina_error_set(0);
199 it = calloc(1, sizeof (Eina_Iterator_Rbtree)); 193 it = calloc(1, sizeof (Eina_Iterator_Rbtree));
200 if (!it) 194 if (!it) return NULL;
201 {
202 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
203 return NULL;
204 }
205 195
206 eina_trash_init(&it->trash); 196 eina_trash_init(&it->trash);
207 197
diff --git a/src/lib/eina/eina_rbtree.h b/src/lib/eina/eina_rbtree.h
index e61a9201d5..e8bcc6581a 100644
--- a/src/lib/eina/eina_rbtree.h
+++ b/src/lib/eina/eina_rbtree.h
@@ -202,9 +202,8 @@ static inline Eina_Rbtree *eina_rbtree_inline_lookup(const Eina_Rbtree *root, co
202 * NULL, this function still returns a valid iterator that will always 202 * NULL, this function still returns a valid iterator that will always
203 * return false on eina_iterator_next(), thus keeping API sane. 203 * return false on eina_iterator_next(), thus keeping API sane.
204 * 204 *
205 * If the memory can not be allocated, @c NULL is returned 205 * If the memory can not be allocated, @c NULL is returned.
206 * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is 206 * Otherwise, a valid iterator is returned.
207 * returned.
208 * 207 *
209 * @warning if the rbtree structure changes then the iterator becomes 208 * @warning if the rbtree structure changes then the iterator becomes
210 * invalid! That is, if you add or remove nodes this iterator 209 * invalid! That is, if you add or remove nodes this iterator
@@ -223,9 +222,8 @@ EAPI Eina_Iterator *eina_rbtree_iterator_prefix(const Eina_Rbtree *root)
223 * NULL, this function still returns a valid iterator that will always 222 * NULL, this function still returns a valid iterator that will always
224 * return false on eina_iterator_next(), thus keeping API sane. 223 * return false on eina_iterator_next(), thus keeping API sane.
225 * 224 *
226 * If the memory can not be allocated, @c NULL is returned 225 * If the memory can not be allocated, @c NULL is returned.
227 * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is 226 * Otherwise, a valid iterator is returned.
228 * returned.
229 * 227 *
230 * @warning if the rbtree structure changes then the iterator becomes 228 * @warning if the rbtree structure changes then the iterator becomes
231 * invalid! That is, if you add or remove nodes this iterator 229 * invalid! That is, if you add or remove nodes this iterator
@@ -244,9 +242,8 @@ EAPI Eina_Iterator *eina_rbtree_iterator_infix(const Eina_Rbtree *root) E
244 * NULL, this function still returns a valid iterator that will always 242 * NULL, this function still returns a valid iterator that will always
245 * return false on eina_iterator_next(), thus keeping API sane. 243 * return false on eina_iterator_next(), thus keeping API sane.
246 * 244 *
247 * If the memory can not be allocated, @c NULL is returned 245 * If the memory can not be allocated, @c NULL is returned.
248 * and #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is 246 * Otherwise, a valid iterator is returned.
249 * returned.
250 * 247 *
251 * @warning if the rbtree structure changes then the iterator becomes 248 * @warning if the rbtree structure changes then the iterator becomes
252 * invalid! That is, if you add or remove nodes this iterator 249 * invalid! That is, if you add or remove nodes this iterator
diff --git a/src/lib/eina/eina_safety_checks.c b/src/lib/eina/eina_safety_checks.c
index eed7c59ddc..5ae59accff 100644
--- a/src/lib/eina/eina_safety_checks.c
+++ b/src/lib/eina/eina_safety_checks.c
@@ -80,8 +80,6 @@ static const char EINA_ERROR_SAFETY_FAILED_STR[] = "Safety check failed.";
80Eina_Bool 80Eina_Bool
81eina_safety_checks_init(void) 81eina_safety_checks_init(void)
82{ 82{
83 EINA_ERROR_SAFETY_FAILED = eina_error_msg_static_register(
84 EINA_ERROR_SAFETY_FAILED_STR);
85 return EINA_TRUE; 83 return EINA_TRUE;
86} 84}
87 85
diff --git a/src/lib/eina/eina_safety_checks.h b/src/lib/eina/eina_safety_checks.h
index 73ae1b295e..d9c22d9ea0 100644
--- a/src/lib/eina/eina_safety_checks.h
+++ b/src/lib/eina/eina_safety_checks.h
@@ -50,7 +50,6 @@
50 * // all these files will emit warning from EINA_ARG_NONNULL() 50 * // all these files will emit warning from EINA_ARG_NONNULL()
51 * #include <Evas.h> // third party headers 51 * #include <Evas.h> // third party headers
52 * #include <Ecore.h> 52 * #include <Ecore.h>
53 * #include <eina_error.h> // eina own header
54 * 53 *
55 * #include <eina_safety_checks.h> 54 * #include <eina_safety_checks.h>
56 * // all these files below will NOT emit warning from EINA_ARG_NONNULL(), 55 * // all these files below will NOT emit warning from EINA_ARG_NONNULL(),
@@ -77,9 +76,8 @@
77 * options to @c configure script. 76 * options to @c configure script.
78 * 77 *
79 * Whenever these macros capture an error, EINA_LOG_ERR() will be 78 * Whenever these macros capture an error, EINA_LOG_ERR() will be
80 * called and @c eina_error set to @c EINA_ERROR_SAFETY_FAILED and can 79 * called.
81 * be checked with eina_error_get() after call. 80 *
82 *
83 * @see EINA_SAFETY_ON_NULL_RETURN(), EINA_SAFETY_ON_NULL_RETURN_VAL() 81 * @see EINA_SAFETY_ON_NULL_RETURN(), EINA_SAFETY_ON_NULL_RETURN_VAL()
84 * and other macros. 82 * and other macros.
85 * 83 *
@@ -89,10 +87,6 @@
89#include "eina_config.h" 87#include "eina_config.h"
90#include "eina_error.h" 88#include "eina_error.h"
91 89
92/**
93 * @var EINA_ERROR_SAFETY_FAILED
94 * Error identifier corresponding to safety check failure.
95 */
96EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED; 90EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED;
97 91
98#ifdef EINA_SAFETY_CHECKS 92#ifdef EINA_SAFETY_CHECKS
@@ -104,7 +98,6 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED;
104 { \ 98 { \
105 if (EINA_UNLIKELY((exp) == NULL)) \ 99 if (EINA_UNLIKELY((exp) == NULL)) \
106 { \ 100 { \
107 eina_error_set(EINA_ERROR_SAFETY_FAILED); \
108 EINA_LOG_ERR("%s", "safety check failed: " # exp " == NULL"); \ 101 EINA_LOG_ERR("%s", "safety check failed: " # exp " == NULL"); \
109 return; \ 102 return; \
110 } \ 103 } \
@@ -116,7 +109,6 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED;
116 { \ 109 { \
117 if (EINA_UNLIKELY((exp) == NULL)) \ 110 if (EINA_UNLIKELY((exp) == NULL)) \
118 { \ 111 { \
119 eina_error_set(EINA_ERROR_SAFETY_FAILED); \
120 EINA_LOG_ERR("%s", "safety check failed: " # exp " == NULL"); \ 112 EINA_LOG_ERR("%s", "safety check failed: " # exp " == NULL"); \
121 return (val); \ 113 return (val); \
122 } \ 114 } \
@@ -128,7 +120,6 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED;
128 { \ 120 { \
129 if (EINA_UNLIKELY((exp) == NULL)) \ 121 if (EINA_UNLIKELY((exp) == NULL)) \
130 { \ 122 { \
131 eina_error_set(EINA_ERROR_SAFETY_FAILED); \
132 EINA_LOG_ERR("%s", "safety check failed: " # exp " == NULL"); \ 123 EINA_LOG_ERR("%s", "safety check failed: " # exp " == NULL"); \
133 goto label; \ 124 goto label; \
134 } \ 125 } \
@@ -140,7 +131,6 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED;
140 { \ 131 { \
141 if (EINA_UNLIKELY(exp)) \ 132 if (EINA_UNLIKELY(exp)) \
142 { \ 133 { \
143 eina_error_set(EINA_ERROR_SAFETY_FAILED); \
144 EINA_LOG_ERR("%s", "safety check failed: " # exp " is true"); \ 134 EINA_LOG_ERR("%s", "safety check failed: " # exp " is true"); \
145 return; \ 135 return; \
146 } \ 136 } \
@@ -152,7 +142,6 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED;
152 { \ 142 { \
153 if (EINA_UNLIKELY(exp)) \ 143 if (EINA_UNLIKELY(exp)) \
154 { \ 144 { \
155 eina_error_set(EINA_ERROR_SAFETY_FAILED); \
156 EINA_LOG_ERR("%s", "safety check failed: " # exp " is true"); \ 145 EINA_LOG_ERR("%s", "safety check failed: " # exp " is true"); \
157 return val; \ 146 return val; \
158 } \ 147 } \
@@ -164,7 +153,6 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED;
164 { \ 153 { \
165 if (EINA_UNLIKELY(exp)) \ 154 if (EINA_UNLIKELY(exp)) \
166 { \ 155 { \
167 eina_error_set(EINA_ERROR_SAFETY_FAILED); \
168 EINA_LOG_ERR("%s", "safety check failed: " # exp " is true"); \ 156 EINA_LOG_ERR("%s", "safety check failed: " # exp " is true"); \
169 goto label; \ 157 goto label; \
170 } \ 158 } \
@@ -176,7 +164,6 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED;
176 { \ 164 { \
177 if (EINA_UNLIKELY(!(exp))) \ 165 if (EINA_UNLIKELY(!(exp))) \
178 { \ 166 { \
179 eina_error_set(EINA_ERROR_SAFETY_FAILED); \
180 EINA_LOG_ERR("%s", "safety check failed: " # exp " is false"); \ 167 EINA_LOG_ERR("%s", "safety check failed: " # exp " is false"); \
181 return; \ 168 return; \
182 } \ 169 } \
@@ -188,7 +175,6 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED;
188 { \ 175 { \
189 if (EINA_UNLIKELY(!(exp))) \ 176 if (EINA_UNLIKELY(!(exp))) \
190 { \ 177 { \
191 eina_error_set(EINA_ERROR_SAFETY_FAILED); \
192 EINA_LOG_ERR("%s", "safety check failed: " # exp " is false"); \ 178 EINA_LOG_ERR("%s", "safety check failed: " # exp " is false"); \
193 return val; \ 179 return val; \
194 } \ 180 } \
@@ -200,7 +186,6 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED;
200 { \ 186 { \
201 if (EINA_UNLIKELY(!(exp))) \ 187 if (EINA_UNLIKELY(!(exp))) \
202 { \ 188 { \
203 eina_error_set(EINA_ERROR_SAFETY_FAILED); \
204 EINA_LOG_ERR("%s", "safety check failed: " # exp " is false"); \ 189 EINA_LOG_ERR("%s", "safety check failed: " # exp " is false"); \
205 goto label; \ 190 goto label; \
206 } \ 191 } \
diff --git a/src/lib/eina/eina_share_common.c b/src/lib/eina/eina_share_common.c
index 0682b6e4e9..563289e7d9 100644
--- a/src/lib/eina/eina_share_common.c
+++ b/src/lib/eina/eina_share_common.c
@@ -71,7 +71,6 @@
71#include "eina_private.h" 71#include "eina_private.h"
72#include "eina_hash.h" 72#include "eina_hash.h"
73#include "eina_rbtree.h" 73#include "eina_rbtree.h"
74#include "eina_error.h"
75#include "eina_lock.h" 74#include "eina_lock.h"
76 75
77/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ 76/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
@@ -401,9 +400,6 @@ _eina_share_common_head_alloc(int slen)
401 const size_t head_size = offsetof(Eina_Share_Common_Head, builtin_node.str); 400 const size_t head_size = offsetof(Eina_Share_Common_Head, builtin_node.str);
402 401
403 head = malloc(head_size + slen); 402 head = malloc(head_size + slen);
404 if (!head)
405 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
406
407 return head; 403 return head;
408} 404}
409 405
@@ -546,9 +542,6 @@ _eina_share_common_node_alloc(unsigned int slen, unsigned int null_size)
546 const size_t node_size = offsetof(Eina_Share_Common_Node, str); 542 const size_t node_size = offsetof(Eina_Share_Common_Node, str);
547 543
548 node = malloc(node_size + slen + null_size); 544 node = malloc(node_size + slen + null_size);
549 if (!node)
550 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
551
552 return node; 545 return node;
553} 546}
554 547
diff --git a/src/lib/eina/eina_strbuf.h b/src/lib/eina/eina_strbuf.h
index 60cc58fbc8..e7f25b97f5 100644
--- a/src/lib/eina/eina_strbuf.h
+++ b/src/lib/eina/eina_strbuf.h
@@ -70,8 +70,7 @@ typedef struct _Eina_Strbuf Eina_Strbuf;
70 * @return Newly allocated string buffer instance. 70 * @return Newly allocated string buffer instance.
71 * 71 *
72 * This function creates a new string buffer. On error, @c NULL is 72 * This function creates a new string buffer. On error, @c NULL is
73 * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To 73 * returned. To free the resources, use eina_strbuf_free().
74 * free the resources, use eina_strbuf_free().
75 * 74 *
76 * @see eina_strbuf_free() 75 * @see eina_strbuf_free()
77 * @see eina_strbuf_append() 76 * @see eina_strbuf_append()
@@ -88,8 +87,7 @@ EAPI Eina_Strbuf *eina_strbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
88 * @return Newly allocated string buffer instance. 87 * @return Newly allocated string buffer instance.
89 * 88 *
90 * This function creates a new string buffer. On error, @c NULL is 89 * This function creates a new string buffer. On error, @c NULL is
91 * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To 90 * returned. To free the resources, use eina_strbuf_free().
92 * free the resources, use eina_strbuf_free().
93 * 91 *
94 * @see eina_strbuf_free() 92 * @see eina_strbuf_free()
95 * @see eina_strbuf_append() 93 * @see eina_strbuf_append()
@@ -108,8 +106,7 @@ EAPI Eina_Strbuf *eina_strbuf_manage_new(char *str) EINA_MALLOC EINA_WARN_UNUSED
108 * @return Newly allocated string buffer instance. 106 * @return Newly allocated string buffer instance.
109 * 107 *
110 * This function creates a new string buffer. On error, @c NULL is 108 * This function creates a new string buffer. On error, @c NULL is
111 * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To 109 * returned. To free the resources, use eina_strbuf_free().
112 * free the resources, use eina_strbuf_free().
113 * 110 *
114 * @see eina_strbuf_manage_new() 111 * @see eina_strbuf_manage_new()
115 * @since 1.2.0 112 * @since 1.2.0
diff --git a/src/lib/eina/eina_strbuf_common.c b/src/lib/eina/eina_strbuf_common.c
index 31ad6832c4..e0faf49145 100644
--- a/src/lib/eina/eina_strbuf_common.c
+++ b/src/lib/eina/eina_strbuf_common.c
@@ -13,7 +13,6 @@
13#include "eina_private.h" 13#include "eina_private.h"
14#include "eina_str.h" 14#include "eina_str.h"
15#include "eina_magic.h" 15#include "eina_magic.h"
16#include "eina_error.h"
17#include "eina_safety_checks.h" 16#include "eina_safety_checks.h"
18#include "eina_strbuf.h" 17#include "eina_strbuf.h"
19#include "eina_strbuf_common.h" 18#include "eina_strbuf_common.h"
@@ -88,14 +87,8 @@ _eina_strbuf_common_init(size_t csize, Eina_Strbuf *buf)
88 buf->size = EINA_STRBUF_INIT_SIZE; 87 buf->size = EINA_STRBUF_INIT_SIZE;
89 buf->step = EINA_STRBUF_INIT_STEP; 88 buf->step = EINA_STRBUF_INIT_STEP;
90 89
91 eina_error_set(0);
92 buf->buf = calloc(csize, buf->size); 90 buf->buf = calloc(csize, buf->size);
93 if (EINA_UNLIKELY(!buf->buf)) 91 if (EINA_UNLIKELY(!buf->buf)) return EINA_FALSE;
94 {
95 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
96 return EINA_FALSE;
97 }
98
99 return EINA_TRUE; 92 return EINA_TRUE;
100} 93}
101 94
@@ -159,16 +152,11 @@ _eina_strbuf_common_resize(size_t csize, Eina_Strbuf *buf, size_t size)
159 152
160 /* reallocate the buffer to the new size */ 153 /* reallocate the buffer to the new size */
161 buffer = realloc(buf->buf, new_size * csize); 154 buffer = realloc(buf->buf, new_size * csize);
162 if (EINA_UNLIKELY(!buffer)) 155 if (EINA_UNLIKELY(!buffer)) return EINA_FALSE;
163 {
164 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
165 return EINA_FALSE;
166 }
167 156
168 buf->buf = buffer; 157 buf->buf = buffer;
169 buf->size = new_size; 158 buf->size = new_size;
170 buf->step = new_step; 159 buf->step = new_step;
171 eina_error_set(0);
172 return EINA_TRUE; 160 return EINA_TRUE;
173} 161}
174 162
@@ -239,8 +227,7 @@ _eina_strbuf_common_insert_length(size_t csize,
239 * @return Newly allocated string buffer instance. 227 * @return Newly allocated string buffer instance.
240 * 228 *
241 * This function creates a new string buffer. On error, @c NULL is 229 * This function creates a new string buffer. On error, @c NULL is
242 * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To 230 * returned. To free the resources, use eina_strbuf_common_free().
243 * free the resources, use eina_strbuf_common_free().
244 * 231 *
245 * @see eina_strbuf_common_free() 232 * @see eina_strbuf_common_free()
246 * @see eina_strbuf_common_append() 233 * @see eina_strbuf_common_append()
@@ -251,13 +238,8 @@ eina_strbuf_common_new(size_t csize)
251{ 238{
252 Eina_Strbuf *buf; 239 Eina_Strbuf *buf;
253 240
254 eina_error_set(0);
255 buf = malloc(sizeof(Eina_Strbuf)); 241 buf = malloc(sizeof(Eina_Strbuf));
256 if (EINA_UNLIKELY(!buf)) 242 if (EINA_UNLIKELY(!buf)) return NULL;
257 {
258 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
259 return NULL;
260 }
261 if (EINA_UNLIKELY(!_eina_strbuf_common_init(csize, buf))) 243 if (EINA_UNLIKELY(!_eina_strbuf_common_init(csize, buf)))
262 { 244 {
263 eina_strbuf_common_free(buf); 245 eina_strbuf_common_free(buf);
@@ -276,8 +258,7 @@ eina_strbuf_common_new(size_t csize)
276 * @return Newly allocated string buffer instance. 258 * @return Newly allocated string buffer instance.
277 * 259 *
278 * This function creates a new string buffer. On error, @c NULL is 260 * This function creates a new string buffer. On error, @c NULL is
279 * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To 261 * returned. To free the resources, use eina_strbuf_common_free().
280 * free the resources, use eina_strbuf_common_free().
281 * 262 *
282 * @see eina_strbuf_common_free() 263 * @see eina_strbuf_common_free()
283 * @see eina_strbuf_common_append() 264 * @see eina_strbuf_common_append()
@@ -291,14 +272,9 @@ eina_strbuf_common_manage_new(size_t csize,
291{ 272{
292 Eina_Strbuf *buf; 273 Eina_Strbuf *buf;
293 274
294 eina_error_set(0);
295 buf = malloc(sizeof(Eina_Strbuf)); 275 buf = malloc(sizeof(Eina_Strbuf));
296 if (EINA_UNLIKELY(!buf)) 276 if (EINA_UNLIKELY(!buf)) return NULL;
297 { 277 if (EINA_UNLIKELY(!_eina_strbuf_common_manage_init(csize, buf, str, len)))
298 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
299 return NULL;
300 }
301 if (EINA_UNLIKELY(!_eina_strbuf_common_manage_init(csize, buf, str, len)))
302 { 278 {
303 eina_strbuf_common_free(buf); 279 eina_strbuf_common_free(buf);
304 return NULL; 280 return NULL;
diff --git a/src/lib/eina/eina_stringshare.c b/src/lib/eina/eina_stringshare.c
index 2232fa9395..a630368745 100644
--- a/src/lib/eina/eina_stringshare.c
+++ b/src/lib/eina/eina_stringshare.c
@@ -37,7 +37,6 @@
37#include "eina_config.h" 37#include "eina_config.h"
38#include "eina_private.h" 38#include "eina_private.h"
39#include "eina_alloca.h" 39#include "eina_alloca.h"
40#include "eina_error.h"
41#include "eina_log.h" 40#include "eina_log.h"
42#include "eina_lock.h" 41#include "eina_lock.h"
43#include "eina_share_common.h" 42#include "eina_share_common.h"
@@ -212,30 +211,15 @@ _eina_stringshare_small_bucket_resize(Eina_Stringshare_Small_Bucket *bucket,
212 void *tmp; 211 void *tmp;
213 212
214 tmp = realloc((void *)bucket->strings, size * sizeof(bucket->strings[0])); 213 tmp = realloc((void *)bucket->strings, size * sizeof(bucket->strings[0]));
215 if (!tmp) 214 if (!tmp) return 0;
216 {
217 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
218 return 0;
219 }
220
221 bucket->strings = tmp; 215 bucket->strings = tmp;
222 216
223 tmp = realloc(bucket->lengths, size * sizeof(bucket->lengths[0])); 217 tmp = realloc(bucket->lengths, size * sizeof(bucket->lengths[0]));
224 if (!tmp) 218 if (!tmp) return 0;
225 {
226 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
227 return 0;
228 }
229
230 bucket->lengths = tmp; 219 bucket->lengths = tmp;
231 220
232 tmp = realloc(bucket->references, size * sizeof(bucket->references[0])); 221 tmp = realloc(bucket->references, size * sizeof(bucket->references[0]));
233 if (!tmp) 222 if (!tmp) return 0;
234 {
235 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
236 return 0;
237 }
238
239 bucket->references = tmp; 223 bucket->references = tmp;
240 224
241 bucket->size = size; 225 bucket->size = size;
@@ -256,11 +240,7 @@ _eina_stringshare_small_bucket_insert_at(
256 if (!bucket) 240 if (!bucket)
257 { 241 {
258 *p_bucket = bucket = calloc(1, sizeof(*bucket)); 242 *p_bucket = bucket = calloc(1, sizeof(*bucket));
259 if (!bucket) 243 if (!bucket) return NULL;
260 {
261 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
262 return NULL;
263 }
264 } 244 }
265 245
266 if (bucket->count + 1 >= bucket->size) 246 if (bucket->count + 1 >= bucket->size)
@@ -271,11 +251,7 @@ _eina_stringshare_small_bucket_insert_at(
271 } 251 }
272 252
273 snew = malloc(length + 1); 253 snew = malloc(length + 1);
274 if (!snew) 254 if (!snew) return NULL;
275 {
276 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
277 return NULL;
278 }
279 255
280 memcpy(snew, str, length); 256 memcpy(snew, str, length);
281 snew[length] = '\0'; 257 snew[length] = '\0';
diff --git a/src/lib/eina/eina_thread.c b/src/lib/eina/eina_thread.c
index 0700650111..6f42fcfeb2 100644
--- a/src/lib/eina/eina_thread.c
+++ b/src/lib/eina/eina_thread.c
@@ -23,7 +23,6 @@
23#include <stdlib.h> 23#include <stdlib.h>
24 24
25#include "eina_config.h" 25#include "eina_config.h"
26#include "eina_error.h"
27#include "eina_thread.h" 26#include "eina_thread.h"
28#include "eina_sched.h" 27#include "eina_sched.h"
29#ifdef _WIN32 28#ifdef _WIN32
@@ -34,18 +33,6 @@
34#include "eina_safety_checks.h" 33#include "eina_safety_checks.h"
35#include "eina_thread.h" 34#include "eina_thread.h"
36 35
37EAPI Eina_Error EINA_ERROR_THREAD_CREATION_FAILED = 0;
38EAPI Eina_Error EINA_ERROR_THREAD_CREATION_FAILED_RESOURCES = 0;
39EAPI Eina_Error EINA_ERROR_THREAD_CREATION_FAILED_PERMISSIONS = 0;
40EAPI Eina_Error EINA_ERROR_THREAD_JOIN_DEADLOCK = 0;
41EAPI Eina_Error EINA_ERROR_THREAD_JOIN_INVALID = 0;
42
43static const char EINA_ERROR_THREAD_CREATION_FAILED_STR[] = "Generic error creating thread";
44static const char EINA_ERROR_THREAD_CREATION_FAILED_RESOURCES_STR[] = "No resources to create thread";
45static const char EINA_ERROR_THREAD_CREATION_FAILED_PERMISSIONS_STR[] = "No permissions to create thread";
46static const char EINA_ERROR_THREAD_JOIN_DEADLOCK_STR[] = "Deadlock detected";
47static const char EINA_ERROR_THREAD_JOIN_INVALID_STR[] = "Invalid thread to join";
48
49#ifdef _WIN32 36#ifdef _WIN32
50# define WIN32_LEAN_AND_MEAN 37# define WIN32_LEAN_AND_MEAN
51# include <windows.h> 38# include <windows.h>
@@ -161,11 +148,7 @@ _eina_thread_join(Eina_Thread t)
161 void *ret; 148 void *ret;
162 149
163 tw = _eina_thread_win32_find(t); 150 tw = _eina_thread_win32_find(t);
164 if (!tw) 151 if (!tw) return NULL;
165 {
166 eina_error_set(EINA_ERROR_THREAD_JOIN_INVALID);
167 return NULL;
168 }
169 152
170 WaitForSingleObject(tw->thread, INFINITE); 153 WaitForSingleObject(tw->thread, INFINITE);
171 CloseHandle(tw->thread); 154 CloseHandle(tw->thread);
@@ -193,13 +176,7 @@ _eina_thread_join(Eina_Thread t)
193 void *ret = NULL; 176 void *ret = NULL;
194 int err = pthread_join(t, &ret); 177 int err = pthread_join(t, &ret);
195 178
196 if (err == 0) 179 if (err == 0) return ret;
197 return ret;
198 else if (err == EDEADLK)
199 eina_error_set(EINA_ERROR_THREAD_JOIN_DEADLOCK);
200 else
201 eina_error_set(EINA_ERROR_THREAD_JOIN_INVALID);
202
203 return NULL; 180 return NULL;
204} 181}
205 182
@@ -228,14 +205,7 @@ _eina_thread_create(Eina_Thread *t, int affinity, void *(*func)(void *data), voi
228 err = pthread_create(t, &attr, func, data); 205 err = pthread_create(t, &attr, func, data);
229 pthread_attr_destroy(&attr); 206 pthread_attr_destroy(&attr);
230 207
231 if (err == 0) 208 if (err == 0) return EINA_TRUE;
232 return EINA_TRUE;
233 else if (err == EAGAIN)
234 eina_error_set(EINA_ERROR_THREAD_CREATION_FAILED_RESOURCES);
235 else if (err == EPERM)
236 eina_error_set(EINA_ERROR_THREAD_CREATION_FAILED_PERMISSIONS);
237 else
238 eina_error_set(EINA_ERROR_THREAD_CREATION_FAILED);
239 209
240 return EINA_FALSE; 210 return EINA_FALSE;
241} 211}
@@ -306,14 +276,8 @@ eina_thread_create(Eina_Thread *t,
306 EINA_SAFETY_ON_NULL_RETURN_VAL(t, EINA_FALSE); 276 EINA_SAFETY_ON_NULL_RETURN_VAL(t, EINA_FALSE);
307 EINA_SAFETY_ON_NULL_RETURN_VAL(func, EINA_FALSE); 277 EINA_SAFETY_ON_NULL_RETURN_VAL(func, EINA_FALSE);
308 278
309 eina_error_set(0);
310
311 c = malloc(sizeof (Eina_Thread_Call)); 279 c = malloc(sizeof (Eina_Thread_Call));
312 if (!c) 280 if (!c) return EINA_FALSE;
313 {
314 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
315 return EINA_FALSE;
316 }
317 281
318 c->func = func; 282 c->func = func;
319 c->data = data; 283 c->data = data;
@@ -324,28 +288,18 @@ eina_thread_create(Eina_Thread *t,
324 return EINA_TRUE; 288 return EINA_TRUE;
325 289
326 free(c); 290 free(c);
327 if (eina_error_get() == 0)
328 eina_error_set(EINA_ERROR_THREAD_CREATION_FAILED);
329
330 return EINA_FALSE; 291 return EINA_FALSE;
331} 292}
332 293
333EAPI void * 294EAPI void *
334eina_thread_join(Eina_Thread t) 295eina_thread_join(Eina_Thread t)
335{ 296{
336 eina_error_set(0);
337 return _eina_thread_join(t); 297 return _eina_thread_join(t);
338} 298}
339 299
340Eina_Bool 300Eina_Bool
341eina_thread_init(void) 301eina_thread_init(void)
342{ 302{
343 EINA_ERROR_THREAD_CREATION_FAILED = eina_error_msg_static_register(EINA_ERROR_THREAD_CREATION_FAILED_STR);
344 EINA_ERROR_THREAD_CREATION_FAILED_RESOURCES = eina_error_msg_static_register(EINA_ERROR_THREAD_CREATION_FAILED_RESOURCES_STR);
345 EINA_ERROR_THREAD_CREATION_FAILED_PERMISSIONS = eina_error_msg_static_register(EINA_ERROR_THREAD_CREATION_FAILED_PERMISSIONS_STR);
346 EINA_ERROR_THREAD_JOIN_DEADLOCK = eina_error_msg_static_register(EINA_ERROR_THREAD_JOIN_DEADLOCK_STR);
347 EINA_ERROR_THREAD_JOIN_INVALID = eina_error_msg_static_register(EINA_ERROR_THREAD_JOIN_INVALID_STR);
348
349 return EINA_TRUE; 303 return EINA_TRUE;
350} 304}
351 305
diff --git a/src/lib/eina/eina_thread.h b/src/lib/eina/eina_thread.h
index 6751a6e9bb..3e89ea9f24 100644
--- a/src/lib/eina/eina_thread.h
+++ b/src/lib/eina/eina_thread.h
@@ -42,46 +42,6 @@
42 * @{ 42 * @{
43 */ 43 */
44 44
45/**
46 * @var EINA_ERROR_THREAD_CREATION_FAILED
47 * Generic error happened and thread couldn't be created.
48 * @since 1.8
49 */
50EAPI extern Eina_Error EINA_ERROR_THREAD_CREATION_FAILED;
51
52/**
53 * @var EINA_ERROR_THREAD_CREATION_FAILED_RESOURCES
54 * System lacked resources to create thread.
55 * @since 1.8
56 */
57EAPI extern Eina_Error EINA_ERROR_THREAD_CREATION_FAILED_RESOURCES;
58
59/**
60 * @var EINA_ERROR_THREAD_CREATION_FAILED_PERMISSIONS
61 * System lacked permissions to create thread.
62 * @since 1.8
63 */
64EAPI extern Eina_Error EINA_ERROR_THREAD_CREATION_FAILED_PERMISSIONS;
65
66/**
67 * @var EINA_ERROR_THREAD_JOIN_DEADLOCK
68 * The system has detected a deadlock situation where both threads
69 * would wait each other. Or the thread wanted to wait for itself.
70 * @since 1.8
71 */
72EAPI extern Eina_Error EINA_ERROR_THREAD_JOIN_DEADLOCK;
73
74/**
75 * @var EINA_ERROR_THREAD_JOIN_INVALID
76 * One of the following happened:
77 * @li thread is not a joinable.
78 * @li thread does not exist.
79 * @li another thread is already waiting for that thread.
80 * @since 1.8
81 */
82EAPI extern Eina_Error EINA_ERROR_THREAD_JOIN_INVALID;
83
84
85typedef unsigned long int Eina_Thread; 45typedef unsigned long int Eina_Thread;
86 46
87typedef void *(*Eina_Thread_Cb)(void *data, Eina_Thread t); 47typedef void *(*Eina_Thread_Cb)(void *data, Eina_Thread t);
diff --git a/src/lib/eina/eina_tiler.c b/src/lib/eina/eina_tiler.c
index 6734b2f076..0301737422 100644
--- a/src/lib/eina/eina_tiler.c
+++ b/src/lib/eina/eina_tiler.c
@@ -33,7 +33,6 @@
33#include "eina_config.h" 33#include "eina_config.h"
34#include "eina_private.h" 34#include "eina_private.h"
35#include "eina_tiler.h" 35#include "eina_tiler.h"
36#include "eina_error.h"
37 36
38/*============================================================================* 37/*============================================================================*
39* Local * 38* Local *
@@ -1386,11 +1385,7 @@ eina_tile_grid_slicer_iterator_new(int x,
1386 return NULL; 1385 return NULL;
1387 1386
1388 it = calloc(1, sizeof(*it)); 1387 it = calloc(1, sizeof(*it));
1389 if (!it) 1388 if (!it) return NULL;
1390 {
1391 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
1392 return NULL;
1393 }
1394 1389
1395 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); 1390 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
1396 1391
diff --git a/src/lib/eina/eina_tmpstr.c b/src/lib/eina/eina_tmpstr.c
index 5ce79c3c20..bc31a58040 100644
--- a/src/lib/eina/eina_tmpstr.c
+++ b/src/lib/eina/eina_tmpstr.c
@@ -32,7 +32,6 @@
32 32
33#include "eina_config.h" 33#include "eina_config.h"
34#include "eina_private.h" 34#include "eina_private.h"
35#include "eina_error.h"
36#include "eina_log.h" 35#include "eina_log.h"
37#include "eina_lock.h" 36#include "eina_lock.h"
38#include "eina_share_common.h" 37#include "eina_share_common.h"
diff --git a/src/lib/eina/eina_ustrbuf.h b/src/lib/eina/eina_ustrbuf.h
index ad2dc8d4c1..ca834a7cf2 100644
--- a/src/lib/eina/eina_ustrbuf.h
+++ b/src/lib/eina/eina_ustrbuf.h
@@ -39,8 +39,7 @@ typedef struct _Eina_Strbuf Eina_UStrbuf;
39 * @return Newly allocated string buffer instance. 39 * @return Newly allocated string buffer instance.
40 * 40 *
41 * This function creates a new string buffer. On error, @c NULL is 41 * This function creates a new string buffer. On error, @c NULL is
42 * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To 42 * returned. To free the resources, use eina_ustrbuf_free().
43 * free the resources, use eina_ustrbuf_free().
44 * 43 *
45 * @see eina_ustrbuf_free() 44 * @see eina_ustrbuf_free()
46 * @see eina_ustrbuf_append() 45 * @see eina_ustrbuf_append()
@@ -57,8 +56,7 @@ EAPI Eina_UStrbuf *eina_ustrbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
57 * @return Newly allocated string buffer instance. 56 * @return Newly allocated string buffer instance.
58 * 57 *
59 * This function creates a new string buffer. On error, @c NULL is 58 * This function creates a new string buffer. On error, @c NULL is
60 * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To 59 * returned. To free the resources, use eina_strbuf_free().
61 * free the resources, use eina_strbuf_free().
62 * 60 *
63 * @see eina_ustrbuf_free() 61 * @see eina_ustrbuf_free()
64 * @see eina_ustrbuf_append() 62 * @see eina_ustrbuf_append()
@@ -77,8 +75,7 @@ EAPI Eina_UStrbuf *eina_ustrbuf_manage_new(Eina_Unicode *str) EINA_MALLOC EINA_W
77 * @return Newly allocated string buffer instance. 75 * @return Newly allocated string buffer instance.
78 * 76 *
79 * This function creates a new string buffer. On error, @c NULL is 77 * This function creates a new string buffer. On error, @c NULL is
80 * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To 78 * returned. To free the resources, use eina_ustrbuf_free().
81 * free the resources, use eina_ustrbuf_free().
82 * 79 *
83 * @see eina_ustrbuf_manage_new() 80 * @see eina_ustrbuf_manage_new()
84 * @since 1.2.0 81 * @since 1.2.0
diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c
index 9dc811b848..a4fbd5cc95 100644
--- a/src/lib/eina/eina_value.c
+++ b/src/lib/eina/eina_value.c
@@ -31,7 +31,6 @@
31#include "eina_config.h" 31#include "eina_config.h"
32#include "eina_private.h" 32#include "eina_private.h"
33#include "eina_alloca.h" 33#include "eina_alloca.h"
34#include "eina_error.h"
35#include "eina_log.h" 34#include "eina_log.h"
36#include "eina_strbuf.h" 35#include "eina_strbuf.h"
37#include "eina_mempool.h" 36#include "eina_mempool.h"
@@ -134,8 +133,6 @@ _eina_value_type_uchar_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
134{ 133{
135 const unsigned char v = *(const unsigned char *)type_mem; 134 const unsigned char v = *(const unsigned char *)type_mem;
136 135
137 eina_error_set(0);
138
139 if (convert == EINA_VALUE_TYPE_UCHAR) 136 if (convert == EINA_VALUE_TYPE_UCHAR)
140 { 137 {
141 unsigned char other_mem = v; 138 unsigned char other_mem = v;
@@ -209,7 +206,6 @@ _eina_value_type_uchar_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
209 } 206 }
210 else 207 else
211 { 208 {
212 eina_error_set(EINA_ERROR_VALUE_FAILED);
213 return EINA_FALSE; 209 return EINA_FALSE;
214 } 210 }
215 211
@@ -281,8 +277,6 @@ _eina_value_type_ushort_convert_to(const Eina_Value_Type *type EINA_UNUSED, cons
281{ 277{
282 const unsigned short v = *(const unsigned short *)type_mem; 278 const unsigned short v = *(const unsigned short *)type_mem;
283 279
284 eina_error_set(0);
285
286 if (convert == EINA_VALUE_TYPE_UCHAR) 280 if (convert == EINA_VALUE_TYPE_UCHAR)
287 { 281 {
288 unsigned char other_mem = v; 282 unsigned char other_mem = v;
@@ -360,7 +354,6 @@ _eina_value_type_ushort_convert_to(const Eina_Value_Type *type EINA_UNUSED, cons
360 } 354 }
361 else 355 else
362 { 356 {
363 eina_error_set(EINA_ERROR_VALUE_FAILED);
364 return EINA_FALSE; 357 return EINA_FALSE;
365 } 358 }
366 359
@@ -432,8 +425,6 @@ _eina_value_type_uint_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
432{ 425{
433 const unsigned int v = *(const unsigned int *)type_mem; 426 const unsigned int v = *(const unsigned int *)type_mem;
434 427
435 eina_error_set(0);
436
437 if (convert == EINA_VALUE_TYPE_UCHAR) 428 if (convert == EINA_VALUE_TYPE_UCHAR)
438 { 429 {
439 unsigned char other_mem = v; 430 unsigned char other_mem = v;
@@ -515,7 +506,6 @@ _eina_value_type_uint_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
515 } 506 }
516 else 507 else
517 { 508 {
518 eina_error_set(EINA_ERROR_VALUE_FAILED);
519 return EINA_FALSE; 509 return EINA_FALSE;
520 } 510 }
521 511
@@ -587,8 +577,6 @@ _eina_value_type_ulong_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
587{ 577{
588 const unsigned long v = *(const unsigned long *)type_mem; 578 const unsigned long v = *(const unsigned long *)type_mem;
589 579
590 eina_error_set(0);
591
592 if (convert == EINA_VALUE_TYPE_UCHAR) 580 if (convert == EINA_VALUE_TYPE_UCHAR)
593 { 581 {
594 unsigned char other_mem = v; 582 unsigned char other_mem = v;
@@ -674,7 +662,6 @@ _eina_value_type_ulong_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
674 } 662 }
675 else 663 else
676 { 664 {
677 eina_error_set(EINA_ERROR_VALUE_FAILED);
678 return EINA_FALSE; 665 return EINA_FALSE;
679 } 666 }
680 667
@@ -746,8 +733,6 @@ _eina_value_type_uint64_convert_to(const Eina_Value_Type *type EINA_UNUSED, cons
746{ 733{
747 const uint64_t v = *(const uint64_t *)type_mem; 734 const uint64_t v = *(const uint64_t *)type_mem;
748 735
749 eina_error_set(0);
750
751 if (convert == EINA_VALUE_TYPE_UCHAR) 736 if (convert == EINA_VALUE_TYPE_UCHAR)
752 { 737 {
753 unsigned char other_mem = v; 738 unsigned char other_mem = v;
@@ -838,7 +823,6 @@ _eina_value_type_uint64_convert_to(const Eina_Value_Type *type EINA_UNUSED, cons
838 } 823 }
839 else 824 else
840 { 825 {
841 eina_error_set(EINA_ERROR_VALUE_FAILED);
842 return EINA_FALSE; 826 return EINA_FALSE;
843 } 827 }
844 828
@@ -910,8 +894,6 @@ _eina_value_type_char_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
910{ 894{
911 const signed char v = *(const signed char *)type_mem; 895 const signed char v = *(const signed char *)type_mem;
912 896
913 eina_error_set(0);
914
915 if (convert == EINA_VALUE_TYPE_UCHAR) 897 if (convert == EINA_VALUE_TYPE_UCHAR)
916 { 898 {
917 unsigned char other_mem = v; 899 unsigned char other_mem = v;
@@ -993,7 +975,6 @@ _eina_value_type_char_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
993 } 975 }
994 else 976 else
995 { 977 {
996 eina_error_set(EINA_ERROR_VALUE_FAILED);
997 return EINA_FALSE; 978 return EINA_FALSE;
998 } 979 }
999 980
@@ -1065,8 +1046,6 @@ _eina_value_type_short_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
1065{ 1046{
1066 const short v = *(const short *)type_mem; 1047 const short v = *(const short *)type_mem;
1067 1048
1068 eina_error_set(0);
1069
1070 if (convert == EINA_VALUE_TYPE_UCHAR) 1049 if (convert == EINA_VALUE_TYPE_UCHAR)
1071 { 1050 {
1072 unsigned char other_mem = v; 1051 unsigned char other_mem = v;
@@ -1154,7 +1133,6 @@ _eina_value_type_short_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
1154 } 1133 }
1155 else 1134 else
1156 { 1135 {
1157 eina_error_set(EINA_ERROR_VALUE_FAILED);
1158 return EINA_FALSE; 1136 return EINA_FALSE;
1159 } 1137 }
1160 1138
@@ -1226,8 +1204,6 @@ _eina_value_type_int_convert_to(const Eina_Value_Type *type EINA_UNUSED, const E
1226{ 1204{
1227 const int v = *(const int *)type_mem; 1205 const int v = *(const int *)type_mem;
1228 1206
1229 eina_error_set(0);
1230
1231 if (convert == EINA_VALUE_TYPE_UCHAR) 1207 if (convert == EINA_VALUE_TYPE_UCHAR)
1232 { 1208 {
1233 unsigned char other_mem = v; 1209 unsigned char other_mem = v;
@@ -1321,7 +1297,6 @@ _eina_value_type_int_convert_to(const Eina_Value_Type *type EINA_UNUSED, const E
1321 } 1297 }
1322 else 1298 else
1323 { 1299 {
1324 eina_error_set(EINA_ERROR_VALUE_FAILED);
1325 return EINA_FALSE; 1300 return EINA_FALSE;
1326 } 1301 }
1327 1302
@@ -1393,8 +1368,6 @@ _eina_value_type_long_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
1393{ 1368{
1394 const long v = *(const long *)type_mem; 1369 const long v = *(const long *)type_mem;
1395 1370
1396 eina_error_set(0);
1397
1398 if (convert == EINA_VALUE_TYPE_UCHAR) 1371 if (convert == EINA_VALUE_TYPE_UCHAR)
1399 { 1372 {
1400 unsigned char other_mem = v; 1373 unsigned char other_mem = v;
@@ -1494,7 +1467,6 @@ _eina_value_type_long_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
1494 } 1467 }
1495 else 1468 else
1496 { 1469 {
1497 eina_error_set(EINA_ERROR_VALUE_FAILED);
1498 return EINA_FALSE; 1470 return EINA_FALSE;
1499 } 1471 }
1500 1472
@@ -1566,8 +1538,6 @@ _eina_value_type_int64_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
1566{ 1538{
1567 const int64_t v = *(const int64_t *)type_mem; 1539 const int64_t v = *(const int64_t *)type_mem;
1568 1540
1569 eina_error_set(0);
1570
1571 if (convert == EINA_VALUE_TYPE_UCHAR) 1541 if (convert == EINA_VALUE_TYPE_UCHAR)
1572 { 1542 {
1573 unsigned char other_mem = v; 1543 unsigned char other_mem = v;
@@ -1674,7 +1644,6 @@ _eina_value_type_int64_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
1674 } 1644 }
1675 else 1645 else
1676 { 1646 {
1677 eina_error_set(EINA_ERROR_VALUE_FAILED);
1678 return EINA_FALSE; 1647 return EINA_FALSE;
1679 } 1648 }
1680 1649
@@ -1746,8 +1715,6 @@ _eina_value_type_float_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
1746{ 1715{
1747 const float v = *(const float *)type_mem; 1716 const float v = *(const float *)type_mem;
1748 1717
1749 eina_error_set(0);
1750
1751 if (convert == EINA_VALUE_TYPE_UCHAR) 1718 if (convert == EINA_VALUE_TYPE_UCHAR)
1752 { 1719 {
1753 unsigned char other_mem = v; 1720 unsigned char other_mem = v;
@@ -1860,7 +1827,6 @@ _eina_value_type_float_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
1860 } 1827 }
1861 else 1828 else
1862 { 1829 {
1863 eina_error_set(EINA_ERROR_VALUE_FAILED);
1864 return EINA_FALSE; 1830 return EINA_FALSE;
1865 } 1831 }
1866 1832
@@ -1932,8 +1898,6 @@ _eina_value_type_double_convert_to(const Eina_Value_Type *type EINA_UNUSED, cons
1932{ 1898{
1933 const double v = *(const double *)type_mem; 1899 const double v = *(const double *)type_mem;
1934 1900
1935 eina_error_set(0);
1936
1937 if (convert == EINA_VALUE_TYPE_UCHAR) 1901 if (convert == EINA_VALUE_TYPE_UCHAR)
1938 { 1902 {
1939 unsigned char other_mem = v; 1903 unsigned char other_mem = v;
@@ -2040,7 +2004,6 @@ _eina_value_type_double_convert_to(const Eina_Value_Type *type EINA_UNUSED, cons
2040 } 2004 }
2041 else 2005 else
2042 { 2006 {
2043 eina_error_set(EINA_ERROR_VALUE_FAILED);
2044 return EINA_FALSE; 2007 return EINA_FALSE;
2045 } 2008 }
2046 2009
@@ -2100,8 +2063,6 @@ _eina_value_type_string_common_convert_to(const Eina_Value_Type *type EINA_UNUSE
2100{ 2063{
2101 const char *v = *(const char **)type_mem; 2064 const char *v = *(const char **)type_mem;
2102 2065
2103 eina_error_set(0);
2104
2105 if (convert == EINA_VALUE_TYPE_UCHAR) 2066 if (convert == EINA_VALUE_TYPE_UCHAR)
2106 { 2067 {
2107 unsigned char other_mem; 2068 unsigned char other_mem;
@@ -2213,7 +2174,6 @@ _eina_value_type_string_common_convert_to(const Eina_Value_Type *type EINA_UNUSE
2213 } 2174 }
2214 else 2175 else
2215 { 2176 {
2216 eina_error_set(EINA_ERROR_VALUE_FAILED);
2217 return EINA_FALSE; 2177 return EINA_FALSE;
2218 } 2178 }
2219 2179
@@ -2286,7 +2246,6 @@ _eina_value_type_string_copy(const Eina_Value_Type *type EINA_UNUSED, const void
2286 *d = strdup(*s); 2246 *d = strdup(*s);
2287 if (*d == NULL) 2247 if (*d == NULL)
2288 { 2248 {
2289 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
2290 return EINA_FALSE; 2249 return EINA_FALSE;
2291 } 2250 }
2292 } 2251 }
@@ -2298,7 +2257,7 @@ _eina_value_type_string_vset(const Eina_Value_Type *type EINA_UNUSED, void *mem,
2298{ 2257{
2299 char **tmem = mem; 2258 char **tmem = mem;
2300 const char *str = va_arg(args, const char *); 2259 const char *str = va_arg(args, const char *);
2301 eina_error_set(0); 2260
2302 if (str == *tmem) return EINA_TRUE; 2261 if (str == *tmem) return EINA_TRUE;
2303 if (!str) 2262 if (!str)
2304 { 2263 {
@@ -2310,7 +2269,6 @@ _eina_value_type_string_vset(const Eina_Value_Type *type EINA_UNUSED, void *mem,
2310 char *tmp = strdup(str); 2269 char *tmp = strdup(str);
2311 if (!tmp) 2270 if (!tmp)
2312 { 2271 {
2313 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
2314 return EINA_FALSE; 2272 return EINA_FALSE;
2315 } 2273 }
2316 free(*tmem); 2274 free(*tmem);
@@ -2324,7 +2282,7 @@ _eina_value_type_string_pset(const Eina_Value_Type *type EINA_UNUSED, void *mem,
2324{ 2282{
2325 char **tmem = mem; 2283 char **tmem = mem;
2326 const char * const *str = ptr; 2284 const char * const *str = ptr;
2327 eina_error_set(0); 2285
2328 if (*str == *tmem) return EINA_TRUE; 2286 if (*str == *tmem) return EINA_TRUE;
2329 if (!*str) 2287 if (!*str)
2330 { 2288 {
@@ -2336,7 +2294,6 @@ _eina_value_type_string_pset(const Eina_Value_Type *type EINA_UNUSED, void *mem,
2336 char *tmp = strdup(*str); 2294 char *tmp = strdup(*str);
2337 if (!tmp) 2295 if (!tmp)
2338 { 2296 {
2339 eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
2340 return EINA_FALSE; 2297 return EINA_FALSE;
2341 } 2298 }
2342 free(*tmem); 2299 free(*tmem);
@@ -2405,7 +2362,6 @@ _eina_value_type_array_copy(const Eina_Value_Type *type EINA_UNUSED, const void
2405 2362
2406 if (!subtype->copy) 2363 if (!subtype->copy)
2407 { 2364 {
2408 eina_error_set(EINA_ERROR_VALUE_FAILED);
2409 return EINA_FALSE; 2365 return EINA_FALSE;
2410 } 2366 }
2411 2367
@@ -2448,14 +2404,12 @@ _eina_value_type_array_compare(const Eina_Value_Type *type EINA_UNUSED, const vo
2448 2404
2449 if (eva_a->subtype != eva_b->subtype) 2405 if (eva_a->subtype != eva_b->subtype)
2450 { 2406 {
2451 eina_error_set(EINA_ERROR_VALUE_FAILED);
2452 return -1; 2407 return -1;
2453 } 2408 }
2454 2409
2455 subtype = eva_a->subtype; 2410 subtype = eva_a->subtype;
2456 if (!subtype->compare) 2411 if (!subtype->compare)
2457 { 2412 {
2458 eina_error_set(EINA_ERROR_VALUE_FAILED);
2459 return 0; 2413 return 0;
2460 } 2414 }
2461 2415
@@ -2570,7 +2524,6 @@ _eina_value_type_array_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
2570 2524
2571 if (!ret) 2525 if (!ret)
2572 { 2526 {
2573 eina_error_set(EINA_ERROR_VALUE_FAILED);
2574 return EINA_FALSE; 2527 return EINA_FALSE;
2575 } 2528 }
2576 return EINA_TRUE; 2529 return EINA_TRUE;
@@ -2613,7 +2566,6 @@ _eina_value_type_array_pset(const Eina_Value_Type *type, void *mem, const void *
2613 const Eina_Value_Array *desc = ptr; 2566 const Eina_Value_Array *desc = ptr;
2614 Eina_Inarray *desc_array; 2567 Eina_Inarray *desc_array;
2615 2568
2616 eina_error_set(0);
2617 if ((!tmem->subtype) && (!desc->subtype)) 2569 if ((!tmem->subtype) && (!desc->subtype))
2618 return EINA_TRUE; 2570 return EINA_TRUE;
2619 2571
@@ -2740,7 +2692,6 @@ _eina_value_type_list_copy(const Eina_Value_Type *type EINA_UNUSED, const void *
2740 2692
2741 if (!subtype->copy) 2693 if (!subtype->copy)
2742 { 2694 {
2743 eina_error_set(EINA_ERROR_VALUE_FAILED);
2744 return EINA_FALSE; 2695 return EINA_FALSE;
2745 } 2696 }
2746 2697
@@ -2781,14 +2732,12 @@ _eina_value_type_list_compare(const Eina_Value_Type *type EINA_UNUSED, const voi
2781 2732
2782 if (eva_a->subtype != eva_b->subtype) 2733 if (eva_a->subtype != eva_b->subtype)
2783 { 2734 {
2784 eina_error_set(EINA_ERROR_VALUE_FAILED);
2785 return -1; 2735 return -1;
2786 } 2736 }
2787 2737
2788 subtype = eva_a->subtype; 2738 subtype = eva_a->subtype;
2789 if (!subtype->compare) 2739 if (!subtype->compare)
2790 { 2740 {
2791 eina_error_set(EINA_ERROR_VALUE_FAILED);
2792 return 0; 2741 return 0;
2793 } 2742 }
2794 2743
@@ -2894,7 +2843,6 @@ _eina_value_type_list_convert_to(const Eina_Value_Type *type EINA_UNUSED, const
2894 2843
2895 if (!ret) 2844 if (!ret)
2896 { 2845 {
2897 eina_error_set(EINA_ERROR_VALUE_FAILED);
2898 return EINA_FALSE; 2846 return EINA_FALSE;
2899 } 2847 }
2900 return EINA_TRUE; 2848 return EINA_TRUE;
@@ -2946,7 +2894,6 @@ _eina_value_type_list_pset(const Eina_Value_Type *type, void *mem, const void *p
2946 Eina_Value_List *tmem = mem; 2894 Eina_Value_List *tmem = mem;
2947 const Eina_Value_List *desc = ptr; 2895 const Eina_Value_List *desc = ptr;
2948 2896
2949 eina_error_set(0);
2950 if ((!tmem->subtype) && (!desc->subtype)) 2897 if ((!tmem->subtype) && (!desc->subtype))
2951 return EINA_TRUE; 2898 return EINA_TRUE;
2952 2899
@@ -3133,7 +3080,6 @@ _eina_value_type_hash_copy(const Eina_Value_Type *type EINA_UNUSED, const void *
3133 3080
3134 if (!s->subtype->copy) 3081 if (!s->subtype->copy)
3135 { 3082 {
3136 eina_error_set(EINA_ERROR_VALUE_FAILED);
3137 return EINA_FALSE; 3083 return EINA_FALSE;
3138 }