API BREAK: fix Eina API so that it is more consistent with the other EFL
authorcaro <caro>
Wed, 24 Jun 2009 16:56:49 +0000 (16:56 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 24 Jun 2009 16:56:49 +0000 (16:56 +0000)
what is modified:

eina_counter_add -> eina_counter_new
eina_counter_delete -> eina_counter_free
eina_lalloc_delete -> eina_lalloc_free
eina_mempool_new -> eina_mempool_add
eina_mempool_delete -> eina_mempool_del
eina_mempool_alloc -> eina_mempool_malloc
eina_tiler_del -> eina_tiler_free

It remains some questions: have the following API a good name:

eina_module_list_delete
eina_list_free
eina_rbtree_delete

(see ticket #286)

If you find any problem, please report in that thread

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@41187 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

19 files changed:
src/include/eina_counter.h
src/include/eina_inline_mempool.x
src/include/eina_lalloc.h
src/include/eina_mempool.h
src/include/eina_module.h
src/include/eina_tiler.h
src/lib/eina_benchmark.c
src/lib/eina_counter.c
src/lib/eina_lalloc.c
src/lib/eina_list.c
src/lib/eina_mempool.c
src/lib/eina_module.c
src/lib/eina_rectangle.c
src/lib/eina_tiler.c
src/tests/eina_bench_mempool.c
src/tests/eina_bench_stringshare_e17.c
src/tests/eina_test_counter.c
src/tests/eina_test_lalloc.c
src/tests/eina_test_mempool.c

index b893687..8bb5093 100644 (file)
@@ -42,8 +42,8 @@ typedef struct _Eina_Counter Eina_Counter;
 EAPI int eina_counter_init(void);
 EAPI int eina_counter_shutdown(void);
 
-EAPI Eina_Counter *eina_counter_add(const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
-EAPI void eina_counter_delete(Eina_Counter *counter) EINA_ARG_NONNULL(1);
+EAPI Eina_Counter *eina_counter_new(const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+EAPI void eina_counter_free(Eina_Counter *counter) EINA_ARG_NONNULL(1);
 
 EAPI void eina_counter_start(Eina_Counter *counter) EINA_ARG_NONNULL(1);
 EAPI void eina_counter_stop(Eina_Counter *counter, int specimen) EINA_ARG_NONNULL(1);
index d8ad1f3..1f4f628 100644 (file)
@@ -45,7 +45,7 @@ eina_mempool_realloc(Eina_Mempool *mp, void *element, unsigned int size)
 }
 
 static inline void *
-eina_mempool_alloc(Eina_Mempool *mp, unsigned int size)
+eina_mempool_malloc(Eina_Mempool *mp, unsigned int size)
 {
    return mp->backend.alloc(mp->backend_data, size);
 }
index 04278c6..df0fbd7 100644 (file)
@@ -41,7 +41,7 @@ typedef void (*Eina_Lalloc_Free) (void *user_data);
 typedef struct _Eina_Lalloc Eina_Lalloc;
 
 EAPI Eina_Lalloc *eina_lalloc_new(void *data, Eina_Lalloc_Alloc alloc_cb, Eina_Lalloc_Free free_cb, int num_init) EINA_ARG_NONNULL(2, 3);
-EAPI void eina_lalloc_delete(Eina_Lalloc *a) EINA_ARG_NONNULL(1);
+EAPI void eina_lalloc_free(Eina_Lalloc *a) EINA_ARG_NONNULL(1);
 EAPI Eina_Bool eina_lalloc_elements_add(Eina_Lalloc *a, int num) EINA_ARG_NONNULL(1);
 EAPI Eina_Bool eina_lalloc_element_add(Eina_Lalloc *a) EINA_ARG_NONNULL(1);
 
index d5e0f74..70aeb3f 100644 (file)
@@ -43,11 +43,11 @@ EAPI extern Eina_Error EINA_ERROR_NOT_MEMPOOL_MODULE;
 EAPI int eina_mempool_init(void);
 EAPI int eina_mempool_shutdown(void);
 
-EAPI Eina_Mempool * eina_mempool_new(const char *module, const char *context, const char *options, ...) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
-EAPI void eina_mempool_delete(Eina_Mempool *mp) EINA_ARG_NONNULL(1);
+EAPI Eina_Mempool * eina_mempool_add(const char *module, const char *context, const char *options, ...) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+EAPI void eina_mempool_del(Eina_Mempool *mp) EINA_ARG_NONNULL(1);
 
 static inline void * eina_mempool_realloc(Eina_Mempool *mp, void *element, unsigned int size) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
-static inline void * eina_mempool_alloc(Eina_Mempool *mp, unsigned int size) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+static inline void * eina_mempool_malloc(Eina_Mempool *mp, unsigned int size) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
 static inline void eina_mempool_free(Eina_Mempool *mp, void *element) EINA_ARG_NONNULL(1);
 
 EAPI void eina_mempool_gc(Eina_Mempool *mp) EINA_ARG_NONNULL(1);
index 9789f0a..1e82d77 100644 (file)
@@ -51,7 +51,7 @@ EAPI int eina_module_init(void);
 EAPI int eina_module_shutdown(void);
 
 EAPI Eina_Module * eina_module_new(const char *file) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
-EAPI Eina_Bool eina_module_delete(Eina_Module *m) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool eina_module_free(Eina_Module *m) EINA_ARG_NONNULL(1);
 EAPI Eina_Bool eina_module_load(Eina_Module *module) EINA_ARG_NONNULL(1);
 EAPI Eina_Bool eina_module_unload(Eina_Module *m) EINA_ARG_NONNULL(1);
 EAPI void *eina_module_symbol_get(Eina_Module *module, const char *symbol) EINA_PURE EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
index 005dc8e..dffa636 100644 (file)
@@ -26,7 +26,7 @@
 typedef struct _Eina_Tiler Eina_Tiler;
 
 EAPI Eina_Tiler *eina_tiler_new(int w, int h);
-EAPI void eina_tiler_del(Eina_Tiler *t);
+EAPI void eina_tiler_free(Eina_Tiler *t);
 EAPI void eina_tiler_tile_size_set(Eina_Tiler *t, int w, int h);
 EAPI Eina_Bool eina_tiler_rect_add(Eina_Tiler *t, Eina_Rectangle *r);
 EAPI void eina_tiler_rect_del(Eina_Tiler *t, Eina_Rectangle *r);
index 1cdf43b..82c5b20 100644 (file)
@@ -405,7 +405,7 @@ eina_benchmark_run(Eina_Benchmark *bench)
 
        eina_array_push(ea, strdup(buffer));
 
-       counter = eina_counter_add(run->name);
+       counter = eina_counter_new(run->name);
 
        for (i = run->start; i < run->end; i += run->step)
          {
@@ -424,7 +424,7 @@ eina_benchmark_run(Eina_Benchmark *bench)
             free(result);
          }
 
-       eina_counter_delete(counter);
+       eina_counter_free(counter);
 
        fclose(current_data);
 
index a4d23bf..578d491 100644 (file)
@@ -153,7 +153,7 @@ _eina_counter_asiprintf(char *base, int *position, const char *format, ...)
  *
  * The counter system must be initialized with eina_counter_init() and
  * shut down with eina_counter_shutdown(). The create a counter, use
- * eina_counter_add(). To free it, use eina_counter_delete().
+ * eina_counter_new(). To free it, use eina_counter_free().
  *
  * To time a part of a code, call eina_counter_start() just before it,
  * and eina_counter_stop() just after it. Each time you start to time
@@ -193,7 +193,7 @@ _eina_counter_asiprintf(char *base, int *position, const char *format, ...)
  *        return EXIT_FAILURE;
  *    }
  *
- *    counter = eina_counter_add("malloc");
+ *    counter = eina_counter_new("malloc");
  *
  *    eina_counter_start(counter);
  *    test_malloc();
@@ -201,7 +201,7 @@ _eina_counter_asiprintf(char *base, int *position, const char *format, ...)
  *
  *    eina_counter_dump(counter);
  *
- *    eina_counter_delete(counter);
+ *    eina_counter_free(counter);
  *    eina_counter_shutdown();
  *
  *    return EXIT_SUCCESS;
@@ -306,7 +306,7 @@ eina_counter_shutdown(void)
  * error is set to #EINA_ERROR_OUT_OF_MEMORY.
  */
 EAPI Eina_Counter *
-eina_counter_add(const char *name)
+eina_counter_new(const char *name)
 {
    Eina_Counter *counter;
    size_t length;
@@ -340,7 +340,7 @@ eina_counter_add(const char *name)
  * immediatly.
  */
 EAPI void
-eina_counter_delete(Eina_Counter *counter)
+eina_counter_free(Eina_Counter *counter)
 {
    EINA_SAFETY_ON_NULL_RETURN(counter);
 
index 3ca9cf4..767e123 100644 (file)
@@ -81,7 +81,7 @@ EAPI Eina_Lalloc * eina_lalloc_new(void *data, Eina_Lalloc_Alloc alloc_cb, Eina_
        return a;
 }
 
-EAPI void eina_lalloc_delete(Eina_Lalloc *a)
+EAPI void eina_lalloc_free(Eina_Lalloc *a)
 {
        EINA_SAFETY_ON_NULL_RETURN(a);
        EINA_SAFETY_ON_NULL_RETURN(a->free_cb);
index 395bffc..08c7db9 100644 (file)
@@ -160,7 +160,7 @@ _eina_list_mempool_accounting_new(__UNUSED__ Eina_List *list)
 {
    Eina_List_Accounting *tmp;
 
-   tmp = eina_mempool_alloc(_eina_list_accounting_mp, sizeof (Eina_List_Accounting));
+   tmp = eina_mempool_malloc(_eina_list_accounting_mp, sizeof (Eina_List_Accounting));
    if (!tmp) return NULL;
 
    EINA_MAGIC_SET(tmp, EINA_MAGIC_LIST_ACCOUNTING);
@@ -181,7 +181,7 @@ _eina_list_mempool_list_new(__UNUSED__ Eina_List *list)
 {
    Eina_List *tmp;
 
-   tmp = eina_mempool_alloc(_eina_list_mp, sizeof (Eina_List));
+   tmp = eina_mempool_malloc(_eina_list_mp, sizeof (Eina_List));
    if (!tmp) return NULL;
 
    EINA_MAGIC_SET(tmp, EINA_MAGIC_LIST);
@@ -487,19 +487,19 @@ eina_list_init(void)
         choice = "chained_mempool";
 #endif
 
-       _eina_list_mp = eina_mempool_new(choice, "list", NULL,
+       _eina_list_mp = eina_mempool_add(choice, "list", NULL,
                                        sizeof (Eina_List), 320);
        if (!_eina_list_mp)
          {
            EINA_ERROR_PERR("ERROR: Mempool for list cannot be allocated in list init.\n");
           goto on_init_fail;
          }
-       _eina_list_accounting_mp = eina_mempool_new(choice, "list_accounting", NULL,
+       _eina_list_accounting_mp = eina_mempool_add(choice, "list_accounting", NULL,
                                                   sizeof (Eina_List_Accounting), 80);
        if (!_eina_list_accounting_mp)
          {
            EINA_ERROR_PERR("ERROR: Mempool for list accounting cannot be allocated in list init.\n");
-          eina_mempool_delete(_eina_list_mp);
+          eina_mempool_del(_eina_list_mp);
           goto on_init_fail;
          }
 
@@ -546,8 +546,8 @@ eina_list_shutdown(void)
 
    if (!_eina_list_init_count)
      {
-       eina_mempool_delete(_eina_list_accounting_mp);
-       eina_mempool_delete(_eina_list_mp);
+       eina_mempool_del(_eina_list_accounting_mp);
+       eina_mempool_del(_eina_list_mp);
 
        eina_mempool_shutdown();
        eina_magic_string_shutdown();
index c495e13..06fe277 100644 (file)
@@ -231,7 +231,7 @@ eina_mempool_shutdown(void)
 }
 
 EAPI Eina_Mempool *
-eina_mempool_new(const char *name, const char *context, const char *options, ...)
+eina_mempool_add(const char *name, const char *context, const char *options, ...)
 {
        Eina_Mempool *mp;
        va_list args;
@@ -245,7 +245,7 @@ eina_mempool_new(const char *name, const char *context, const char *options, ...
        return mp;
 }
 
-EAPI void eina_mempool_delete(Eina_Mempool *mp)
+EAPI void eina_mempool_del(Eina_Mempool *mp)
 {
         EINA_SAFETY_ON_NULL_RETURN(mp);
        EINA_SAFETY_ON_NULL_RETURN(mp->backend.shutdown);
index 2ae4902..8a3a02a 100644 (file)
@@ -140,7 +140,7 @@ static void _dir_list_cb(const char *name, const char *path, void *data)
                        return;
                /* call the user provided cb on this module */
                if (!cb_data->cb(m, cb_data->data))
-                 eina_module_delete(m);
+                 eina_module_free(m);
        }
 }
 static int _eina_module_count = 0;
@@ -269,7 +269,7 @@ EAPI Eina_Module * eina_module_new(const char *file)
        return m;
 }
 
-EAPI Eina_Bool eina_module_delete(Eina_Module *m)
+EAPI Eina_Bool eina_module_free(Eina_Module *m)
 {
        EINA_SAFETY_ON_NULL_RETURN_VAL(m, EINA_FALSE);
 
@@ -422,7 +422,7 @@ EAPI void eina_module_list_unload(Eina_Array *array)
 
 /**
  * Helper function that iterates over the list of modules and calls
- * eina_module_delete on each
+ * eina_module_free on each
  */
 EAPI void eina_module_list_delete(Eina_Array *array)
 {
@@ -433,7 +433,7 @@ EAPI void eina_module_list_delete(Eina_Array *array)
        EINA_SAFETY_ON_NULL_RETURN(array);
 
        EINA_ARRAY_ITER_NEXT(array, i, m, iterator)
-               eina_module_delete(m);
+               eina_module_free(m);
 
        eina_array_flush(array);
 }
index 32dbab1..e147d9f 100644 (file)
@@ -217,7 +217,7 @@ eina_rectangle_new(int x, int y, int w, int h)
 {
    Eina_Rectangle *rect;
 
-   rect = eina_mempool_alloc(_eina_rectangle_mp, sizeof (Eina_Rectangle));
+   rect = eina_mempool_malloc(_eina_rectangle_mp, sizeof (Eina_Rectangle));
    if (!rect) return NULL;
 
    EINA_RECTANGLE_SET(rect, x, y, w, h);
@@ -301,8 +301,8 @@ eina_rectangle_pool_request(Eina_Rectangle_Pool *pool, int w, int h)
    if (x == -1) return NULL;
    pool->sorted = EINA_FALSE;
 
-   new = eina_mempool_alloc(_eina_rectangle_alloc_mp,
-                           sizeof (Eina_Rectangle_Alloc) + sizeof (Eina_Rectangle));
+   new = eina_mempool_malloc(_eina_rectangle_alloc_mp,
+                            sizeof (Eina_Rectangle_Alloc) + sizeof (Eina_Rectangle));
    if (!new) return NULL;
 
    rect = (Eina_Rectangle*) (new + 1);
@@ -415,7 +415,7 @@ eina_rectangle_init(void)
      choice = "chained_mempool";
 #endif
 
-   _eina_rectangle_alloc_mp = eina_mempool_new(choice, "rectangle-alloc", NULL,
+   _eina_rectangle_alloc_mp = eina_mempool_add(choice, "rectangle-alloc", NULL,
                                          sizeof (Eina_Rectangle_Alloc) + sizeof (Eina_Rectangle), 42);
    if (!_eina_rectangle_alloc_mp)
      {
@@ -423,7 +423,7 @@ eina_rectangle_init(void)
         goto init_error;
      }
 
-   _eina_rectangle_mp = eina_mempool_new(choice, "rectangle", NULL, sizeof (Eina_Rectangle), 256);
+   _eina_rectangle_mp = eina_mempool_add(choice, "rectangle", NULL, sizeof (Eina_Rectangle), 256);
    if (!_eina_rectangle_mp)
      {
         EINA_ERROR_PERR("ERROR: Mempool for rectangle cannot be allocated in list init.\n");
@@ -447,8 +447,8 @@ eina_rectangle_shutdown(void)
 
    if (_eina_rectangle_init_count) return _eina_rectangle_init_count;
 
-   eina_mempool_delete(_eina_rectangle_alloc_mp);
-   eina_mempool_delete(_eina_rectangle_mp);
+   eina_mempool_del(_eina_rectangle_alloc_mp);
+   eina_mempool_del(_eina_rectangle_mp);
 
    eina_mempool_shutdown();
    eina_error_shutdown();
index e32e3da..78328ff 100644 (file)
@@ -1111,7 +1111,7 @@ EAPI Eina_Tiler *eina_tiler_new(int w, int h)
  * To be documented
  * FIXME: To be fixed
  */
-EAPI void eina_tiler_del(Eina_Tiler *t)
+EAPI void eina_tiler_free(Eina_Tiler *t)
 {
        EINA_MAGIC_CHECK_TILER(t);
        _splitter_del(t);
index 17ba444..d89e2cb 100644 (file)
@@ -42,7 +42,7 @@ _eina_mempool_bench(Eina_Mempool *mp, int request)
      {
        for (j = 0; j < request; ++j)
          {
-            eina_array_push(array, eina_mempool_alloc(mp, sizeof (int)));
+            eina_array_push(array, eina_mempool_malloc(mp, sizeof (int)));
          }
 
        for (j = 0; j < request; ++j)
@@ -60,9 +60,9 @@ eina_mempool_chained_mempool(int request)
 {
    Eina_Mempool *mp;
 
-   mp = eina_mempool_new("chained_mempool", "test", NULL, sizeof (int), 256);
+   mp = eina_mempool_add("chained_mempool", "test", NULL, sizeof (int), 256);
    _eina_mempool_bench(mp, request);
-   eina_mempool_delete(mp);
+   eina_mempool_del(mp);
 }
 
 static void
@@ -70,9 +70,9 @@ eina_mempool_pass_through(int request)
 {
    Eina_Mempool *mp;
 
-   mp = eina_mempool_new("pass_through", "test", NULL, sizeof (int), 8, 0);
+   mp = eina_mempool_add("pass_through", "test", NULL, sizeof (int), 8, 0);
    _eina_mempool_bench(mp, request);
-   eina_mempool_delete(mp);
+   eina_mempool_del(mp);
 }
 
 static void
@@ -80,9 +80,9 @@ eina_mempool_fixed_bitmap(int request)
 {
    Eina_Mempool *mp;
 
-   mp = eina_mempool_new("fixed_bitmap", "test", NULL, sizeof (int));
+   mp = eina_mempool_add("fixed_bitmap", "test", NULL, sizeof (int));
    _eina_mempool_bench(mp, request);
-   eina_mempool_delete(mp);
+   eina_mempool_del(mp);
 }
 
 #ifdef EINA_EMEMOA_SUPPORT
@@ -91,9 +91,9 @@ eina_mempool_ememoa_fixed(int request)
 {
    Eina_Mempool *mp;
 
-   mp = eina_mempool_new("ememoa_fixed", "test", NULL, sizeof (int), 8, 0);
+   mp = eina_mempool_add("ememoa_fixed", "test", NULL, sizeof (int), 8, 0);
    _eina_mempool_bench(mp, request);
-   eina_mempool_delete(mp);
+   eina_mempool_del(mp);
 }
 
 static void
@@ -101,9 +101,9 @@ eina_mempool_ememoa_unknown(int request)
 {
    Eina_Mempool *mp;
 
-   mp = eina_mempool_new("ememoa_unknown", "test", NULL, 0, 2, sizeof (int), 8, sizeof (int) * 2, 8);
+   mp = eina_mempool_add("ememoa_unknown", "test", NULL, 0, 2, sizeof (int), 8, sizeof (int) * 2, 8);
    _eina_mempool_bench(mp, request);
-   eina_mempool_delete(mp);
+   eina_mempool_del(mp);
 }
 #endif
 
index f9b357f..06bfec0 100644 (file)
@@ -97,7 +97,7 @@ eina_bench_e17_stringshare(Eina_Stringshare_Test *str)
 {
    Eina_Counter *cnt;
 
-   cnt = eina_counter_add(str->name);
+   cnt = eina_counter_new(str->name);
 
    eina_counter_start(cnt);
 
@@ -112,7 +112,7 @@ eina_bench_e17_stringshare(Eina_Stringshare_Test *str)
    fprintf(stderr, "For `%s`:\n", str->name);
    eina_counter_dump(cnt);
 
-   eina_counter_delete(cnt);
+   eina_counter_free(cnt);
 }
 #endif
 
index 22789cc..b5aef0c 100644 (file)
@@ -47,7 +47,7 @@ START_TEST(eina_counter_simple)
 
    eina_counter_init();
 
-   cnt = eina_counter_add("eina_test");
+   cnt = eina_counter_new("eina_test");
    fail_if(!cnt);
 
    eina_counter_start(cnt);
@@ -71,7 +71,7 @@ START_TEST(eina_counter_simple)
 
    free(dump);
 
-   eina_counter_delete(cnt);
+   eina_counter_free(cnt);
 
    eina_counter_shutdown();
 }
@@ -84,12 +84,12 @@ START_TEST(eina_counter_break)
 
    eina_counter_init();
 
-   cnt = eina_counter_add("eina_test");
+   cnt = eina_counter_new("eina_test");
    fail_if(!cnt);
 
    eina_counter_stop(cnt, 10);
 
-   eina_counter_delete(cnt);
+   eina_counter_free(cnt);
 
    dump = eina_counter_dump(NULL);
    fail_if(dump);
index 0b6ba6a..9248fe0 100644 (file)
@@ -74,7 +74,7 @@ START_TEST(eina_lalloc_simple)
 
    fail_if(eina_lalloc_elements_add(test, 50) != EINA_FALSE);
 
-   eina_lalloc_delete(test);
+   eina_lalloc_free(test);
 }
 END_TEST
 
index 43b86ac..8556a4f 100644 (file)
@@ -52,7 +52,7 @@ _eina_mempool_test(Eina_Mempool *mp, Eina_Bool with_realloc, Eina_Bool with_gc)
 
    for (i = 0; i < 512; ++i)
      {
-       tbl[i] = eina_mempool_alloc(mp, sizeof (int));
+       tbl[i] = eina_mempool_malloc(mp, sizeof (int));
        fail_if(!tbl[i]);
        *tbl[i] = i;
      }
@@ -74,7 +74,7 @@ _eina_mempool_test(Eina_Mempool *mp, Eina_Bool with_realloc, Eina_Bool with_gc)
        eina_mempool_statistics(mp);
      }
 
-   eina_mempool_delete(mp);
+   eina_mempool_del(mp);
 }
 
 START_TEST(eina_mempool_init_shutdown)
@@ -83,7 +83,7 @@ START_TEST(eina_mempool_init_shutdown)
 
    _mempool_init();
 
-   mp = eina_mempool_new("test", "test", NULL);
+   mp = eina_mempool_add("test", "test", NULL);
    fail_if(mp != NULL);
 
    _mempool_shutdown();
@@ -96,7 +96,7 @@ START_TEST(eina_mempool_chained_mempool)
 
    _mempool_init();
 
-   mp = eina_mempool_new("chained_mempool", "test", NULL, sizeof (int), 256);
+   mp = eina_mempool_add("chained_mempool", "test", NULL, sizeof (int), 256);
    _eina_mempool_test(mp, EINA_FALSE, EINA_FALSE);
 
    _mempool_shutdown();
@@ -109,7 +109,7 @@ START_TEST(eina_mempool_pass_through)
 
    _mempool_init();
 
-   mp = eina_mempool_new("pass_through", "test", NULL, sizeof (int), 8, 0);
+   mp = eina_mempool_add("pass_through", "test", NULL, sizeof (int), 8, 0);
    _eina_mempool_test(mp, EINA_TRUE, EINA_FALSE);
 
    _mempool_shutdown();
@@ -122,7 +122,7 @@ START_TEST(eina_mempool_fixed_bitmap)
 
    _mempool_init();
 
-   mp = eina_mempool_new("fixed_bitmap", "test", NULL, sizeof (int));
+   mp = eina_mempool_add("fixed_bitmap", "test", NULL, sizeof (int));
    _eina_mempool_test(mp, EINA_FALSE, EINA_FALSE);
 
    _mempool_shutdown();
@@ -136,7 +136,7 @@ START_TEST(eina_mempool_ememoa_fixed)
 
    _mempool_init();
 
-   mp = eina_mempool_new("ememoa_fixed", "test", NULL, sizeof (int), 8, 0);
+   mp = eina_mempool_add("ememoa_fixed", "test", NULL, sizeof (int), 8, 0);
    _eina_mempool_test(mp, EINA_FALSE, EINA_TRUE);
 
    _mempool_shutdown();
@@ -149,7 +149,7 @@ START_TEST(eina_mempool_ememoa_unknown)
 
    _mempool_init();
 
-   mp = eina_mempool_new("ememoa_unknown", "test", NULL, 0, 2, sizeof (int), 8, sizeof (int) * 2, 8);
+   mp = eina_mempool_add("ememoa_unknown", "test", NULL, 0, 2, sizeof (int), 8, sizeof (int) * 2, 8);
    _eina_mempool_test(mp, EINA_TRUE, EINA_TRUE);
 
    _mempool_shutdown();