diff --git a/legacy/eina/configure.in b/legacy/eina/configure.in index f9870ae29d..11286f3677 100644 --- a/legacy/eina/configure.in +++ b/legacy/eina/configure.in @@ -194,6 +194,7 @@ src/modules/Makefile src/modules/mp/Makefile src/modules/mp/chained_pool/Makefile src/modules/mp/ememoa_fixed/Makefile +src/modules/mp/pass_through/Makefile src/tests/Makefile ]) diff --git a/legacy/eina/src/modules/mp/Makefile.am b/legacy/eina/src/modules/mp/Makefile.am index 5cf54f2ca5..ff9863c222 100644 --- a/legacy/eina/src/modules/mp/Makefile.am +++ b/legacy/eina/src/modules/mp/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = chained_pool ememoa_fixed +SUBDIRS = chained_pool ememoa_fixed pass_through MAINTAINERCLEANFILES = \ Makefile.in \ No newline at end of file diff --git a/legacy/eina/src/modules/mp/pass_through/.cvsignore b/legacy/eina/src/modules/mp/pass_through/.cvsignore new file mode 100644 index 0000000000..7d364c46c0 --- /dev/null +++ b/legacy/eina/src/modules/mp/pass_through/.cvsignore @@ -0,0 +1,7 @@ +Makefile.in +Makefile +*.la +*.lo +*.gcno +.libs +.deps diff --git a/legacy/eina/src/modules/mp/pass_through/Makefile.am b/legacy/eina/src/modules/mp/pass_through/Makefile.am new file mode 100644 index 0000000000..24badd48ee --- /dev/null +++ b/legacy/eina/src/modules/mp/pass_through/Makefile.am @@ -0,0 +1,19 @@ +MAINTAINERCLEANFILES = \ +Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/include \ +@COVERAGE_CFLAGS@ \ +@EMEMOA_CFLAGS@ + +controllerdir = $(libdir)/eina/pass_through/ +controller_LTLIBRARIES = pass_through.la + +pass_through_la_SOURCES = \ +pass_through.c + +pass_through_la_LIBADD = $(top_builddir)/src/lib/libeina.la @COVERAGE_LIBS@ +pass_through_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +pass_through_la_DEPENDENCIES = $(top_builddir)/src/lib/libeina.la + diff --git a/legacy/eina/src/modules/mp/pass_through/pass_through.c b/legacy/eina/src/modules/mp/pass_through/pass_through.c new file mode 100644 index 0000000000..bc5fd57119 --- /dev/null +++ b/legacy/eina/src/modules/mp/pass_through/pass_through.c @@ -0,0 +1,70 @@ +/* + * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 + */ +/* EINA - EFL data type library + * Copyright (C) 2008 Cedric BAIL + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; + * if not, see . + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include "eina_types.h" +#include "eina_private.h" + +static void * +eina_pass_through_malloc(__UNUSED__ void *data, unsigned int size) +{ + return malloc(size); +} + +static void +eina_pass_through_free(__UNUSED__ void *data, void *ptr) +{ + free(ptr); +} + +static void* +eina_pass_through_realloc(__UNUSED__ void *data, void *ptr, unsigned int size) +{ + return realloc(ptr, size); +} + +static void* +eina_pass_through_init(__UNUSED__ const char *context, __UNUSED__ const char *option, __UNUSED__ va_list args) +{ + return NULL; +} + +static void +eina_pass_through_shutdown(__UNUSED__ void *data) +{ +} + +Eina_Mempool_Backend mp_backend = { + .init = &eina_pass_through_init, + .shutdown = &eina_pass_through_shutdown, + .realloc = &eina_pass_through_realloc, + .alloc = &eina_pass_through_malloc, + .free = &eina_pass_through_free, + .garbage_collect = NULL, + .statistics = NULL +}; + +