aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/eina/src/modules/mp/pass_through/eina_pass_through.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-04 18:41:13 +1000
committerDavid Walter Seikel2012-01-04 18:41:13 +1000
commitdd7595a3475407a7fa96a97393bae8c5220e8762 (patch)
treee341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/eina/src/modules/mp/pass_through/eina_pass_through.c
parentAdd the skeleton. (diff)
downloadSledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to '')
-rw-r--r--libraries/eina/src/modules/mp/pass_through/eina_pass_through.c90
1 files changed, 90 insertions, 0 deletions
diff --git a/libraries/eina/src/modules/mp/pass_through/eina_pass_through.c b/libraries/eina/src/modules/mp/pass_through/eina_pass_through.c
new file mode 100644
index 0000000..196868e
--- /dev/null
+++ b/libraries/eina/src/modules/mp/pass_through/eina_pass_through.c
@@ -0,0 +1,90 @@
1/* EINA - EFL data type library
2 * Copyright (C) 2008 Cedric BAIL
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library;
16 * if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifdef HAVE_CONFIG_H
20# include "config.h"
21#endif
22
23#include <stdlib.h>
24
25#include "eina_types.h"
26#include "eina_module.h"
27#include "eina_mempool.h"
28#include "eina_private.h"
29
30static void *
31eina_pass_through_malloc(__UNUSED__ void *data, unsigned int size)
32{
33 return malloc(size);
34}
35
36static void
37eina_pass_through_free(__UNUSED__ void *data, void *ptr)
38{
39 free(ptr);
40}
41
42static void *
43eina_pass_through_realloc(__UNUSED__ void *data, void *ptr, unsigned int size)
44{
45 return realloc(ptr, size);
46}
47
48static void *
49eina_pass_through_init(__UNUSED__ const char *context,
50 __UNUSED__ const char *option,
51 __UNUSED__ va_list args)
52{
53 return (void *)0x1;
54}
55
56static void
57eina_pass_through_shutdown(__UNUSED__ void *data)
58{
59}
60
61
62static Eina_Mempool_Backend _eina_pass_through_mp_backend = {
63 "pass_through",
64 &eina_pass_through_init,
65 &eina_pass_through_free,
66 &eina_pass_through_malloc,
67 &eina_pass_through_realloc,
68 NULL,
69 NULL,
70 &eina_pass_through_shutdown,
71 NULL
72};
73
74Eina_Bool pass_through_init(void)
75{
76 return eina_mempool_register(&_eina_pass_through_mp_backend);
77}
78
79void pass_through_shutdown(void)
80{
81 eina_mempool_unregister(&_eina_pass_through_mp_backend);
82}
83
84#ifndef EINA_STATIC_BUILD_PASS_THROUGH
85
86EINA_MODULE_INIT(pass_through_init);
87EINA_MODULE_SHUTDOWN(pass_through_shutdown);
88
89#endif /* ! EINA_STATIC_BUILD_PASS_THROUGH */
90