1 /* EINA - EFL data type library
2 * Copyright (C) 2008 Cedric Bail
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.
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.
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/>.
23 #include "eina_types.h"
24 #include "eina_main.h"
25 #include "eina_error.h"
26 #include "eina_hash.h"
27 #include "eina_stringshare.h"
28 #include "eina_list.h"
29 #include "eina_array.h"
30 #include "eina_counter.h"
31 #include "eina_benchmark.h"
32 #include "eina_magic.h"
33 #include "eina_rectangle.h"
35 /*============================================================================*
37 *============================================================================*/
39 /*============================================================================*
41 *============================================================================*/
43 static int _eina_main_count = 0;
48 if (_eina_main_count) goto finish_init;
52 eina_stringshare_init();
56 eina_benchmark_init();
57 eina_magic_string_init();
58 eina_rectangle_init();
61 return ++_eina_main_count;
67 if (_eina_main_count != 1) goto finish_shutdown;
69 eina_rectangle_shutdown();
70 eina_magic_string_shutdown();
71 eina_benchmark_shutdown();
72 eina_counter_shutdown();
73 eina_array_shutdown();
75 eina_stringshare_shutdown();
77 eina_error_shutdown();
80 return --_eina_main_count;